Skip to content
farrelfzPublic

About

Physics Education Research Intelligence Assistant — LLM + RAG untuk riset pendidikan fisika

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

⚛️ PHYSION

Physics Education Research Intelligence Assistant

An AI-powered research assistant built on LLM + RAG that helps students, lecturers, and researchers in Physics Education discover State of the Art, Research Gaps, Novelty, Future Directions, and DOI-referenced articles — all grounded in a curated academic corpus.


📋 Table of Contents


Overview

PHYSION is a Retrieval-Augmented Generation (RAG) application designed for the Physics Education research community. It combines:

  • OpenAlex API for sourcing peer-reviewed Physics Education articles (2020–2025)
  • HuggingFace Sentence Transformers for semantic vector embeddings
  • ChromaDB as the persistent vector database
  • Groq (Llama 3.3 70B) as the language model backend
  • Streamlit for a clean, interactive research chat interface

PHYSION answers research questions by retrieving the most relevant academic articles from its indexed corpus and synthesizing a structured response — always citing real DOIs from the source documents.


Problem Statement

Researchers and students in Physics Education face a common challenge:

Information overload — thousands of papers are published annually, making it hard to quickly identify what is already known (SOTA), what is missing (Research Gap), what is new (Novelty), and where to go next (Future Direction).

Traditional keyword search tools return raw lists of papers. PHYSION goes further by:

  1. Semantically understanding the research question
  2. Retrieving the most relevant articles from the corpus
  3. Synthesizing a structured, DOI-referenced answer

Dataset

Property Value
Source OpenAlex API
Topic Physics Education
Year Range 2020–2025
Target Size 100 articles
Format Plain text (.txt) — one article per block
Fields Title, Authors, Year, Journal, DOI, Keywords, Abstract

The corpus is collected automatically by running:

python collect_openalex.py

Each article in data/physics_education_corpus.txt follows this structure:

==================================================
TITLE:
...

AUTHORS:
...

YEAR:
...

JOURNAL:
...

DOI:
...

KEYWORDS:
...

ABSTRACT:
...

==================================================

Architecture

┌─────────────────────────────────────────────┐
│          Physics Education Corpus           │
│       (data/physics_education_corpus.txt)   │
└──────────────────┬──────────────────────────┘
                   │
          Article-Level Chunking
          (one article = one chunk)
                   │
          ┌────────▼────────┐
          │  HuggingFace    │
          │  Embeddings     │
          │  (MiniLM-L6-v2) │
          └────────┬────────┘
                   │
          ┌────────▼────────┐
          │   ChromaDB      │
          │  Vector Store   │
          └────────┬────────┘
                   │
         User Query → Top-5 Retrieval
                   │
          ┌────────▼────────┐
          │  Groq LLM       │
          │  (Llama 3.3 70B)│
          └────────┬────────┘
                   │
          ┌────────▼────────────────────┐
          │  Structured Response        │
          │  ─────────────────────────  │
          │  ## SUMMARY                 │
          │  ## SUPPORTING ARTICLES     │
          │     DOI references          │
          └─────────────────────────────┘

Installation

Prerequisites

Steps

# 1. Clone the repository
git clone <your-repo-url>
cd physion

# 2. Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate

# 3. Install dependencies
pip install -r requirements.txt

# 4. Set up environment variables
cp .env.example .env
# Edit .env and add your GROQ_API_KEY

# 5. Collect the Physics Education corpus
python collect_openalex.py

# 6. Run the application
streamlit run app.py

Usage

Once the app is running, open your browser to http://localhost:8501.

What PHYSION can answer

Query Type Example
State of the Art "What are the SOTA trends in virtual laboratory for physics?"
Research Gap "What research gaps exist in PhET simulation studies?"
Novelty "What novelty opportunities are open in STEM education research?"
Future Direction "What future directions are suggested for AR in physics classrooms?"
Article Search "Find articles about inquiry-based physics learning."

Response Format

Every PHYSION response is structured as:

## SUMMARY
[Synthesized answer based on retrieved articles]

## SUPPORTING ARTICLES
1. Full Article Title
   - Authors: ...
   - Journal: ...
   - Year: ...
   - DOI: ...

⚠️ PHYSION never fabricates DOIs or article titles. If information is not found in the corpus, it responds: "Information not found in the Physion corpus."


Deployment

Streamlit Community Cloud

  1. Push this repository to GitHub
  2. Go to share.streamlit.io and connect your repo
  3. Set GROQ_API_KEY as a secret in the Streamlit Cloud settings
  4. Set the main file to app.py

Note: Commit data/physics_education_corpus.txt to the repository so the cloud deployment has the corpus available without re-running the collection script.

Hugging Face Spaces

  1. Create a new Space with Streamlit SDK on huggingface.co/spaces
  2. Upload all project files
  3. Add GROQ_API_KEY as a Space secret
  4. The Space will automatically run streamlit run app.py

Render

  1. Create a new Web Service on render.com
  2. Connect your GitHub repository
  3. Set the Build Command: pip install -r requirements.txt
  4. Set the Start Command: streamlit run app.py --server.port $PORT --server.headless true
  5. Add GROQ_API_KEY as an environment variable

Tech Stack

Component Technology
Language Model Groq — Llama 3.3 70B Versatile
Embedding Model sentence-transformers/all-MiniLM-L6-v2
Vector Database ChromaDB
RAG Framework LangChain
Data Source OpenAlex API
UI Streamlit
Language Python 3.10+

License

This project is released under the MIT License.


PHYSION — Built for Physics Education Research · Powered by LangChain + Groq + ChromaDB

About

Physics Education Research Intelligence Assistant — LLM + RAG untuk riset pendidikan fisika

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages