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.
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.
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:
- Semantically understanding the research question
- Retrieving the most relevant articles from the corpus
- Synthesizing a structured, DOI-referenced answer
| 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.pyEach article in data/physics_education_corpus.txt follows this structure:
==================================================
TITLE:
...
AUTHORS:
...
YEAR:
...
JOURNAL:
...
DOI:
...
KEYWORDS:
...
ABSTRACT:
...
==================================================
┌─────────────────────────────────────────────┐
│ 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 │
└─────────────────────────────┘
- Python 3.10 or later
- A free Groq API key
# 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.pyOnce the app is running, open your browser to http://localhost:8501.
| 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." |
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."
- Push this repository to GitHub
- Go to share.streamlit.io and connect your repo
- Set
GROQ_API_KEYas a secret in the Streamlit Cloud settings - Set the main file to
app.py
Note: Commit
data/physics_education_corpus.txtto the repository so the cloud deployment has the corpus available without re-running the collection script.
- Create a new Space with Streamlit SDK on huggingface.co/spaces
- Upload all project files
- Add
GROQ_API_KEYas a Space secret - The Space will automatically run
streamlit run app.py
- Create a new Web Service on render.com
- Connect your GitHub repository
- Set the Build Command:
pip install -r requirements.txt - Set the Start Command:
streamlit run app.py --server.port $PORT --server.headless true - Add
GROQ_API_KEYas an environment variable
| 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+ |
This project is released under the MIT License.
PHYSION — Built for Physics Education Research · Powered by LangChain + Groq + ChromaDB