The Research Query Assistant is an intelligent Retrieval-Augmented Generation (RAG) system designed to answer academic or research-based questions by retrieving relevant research papers and generating insightful responses using Groq's Llama 3.3 model.
The system integrates multiple academic APIs (CrossRef, Semantic Scholar, Core API, etc.) and supports both local document retrieval (via FAISS) and live research queries.
- π RAG Pipeline combining vector search and LLM reasoning.
- π Automatic PDF text extraction from research papers.
- πΎ Chunk-based document storage for efficient retrieval.
- π§ SentenceTransformer embeddings for semantic similarity.
- β‘ FAISS-based vector search for fast retrieval.
- π Groq Llama 3.3 Integration for intelligent answering.
- π§© Streamlit Interface for user-friendly interaction.
π¦ Research-Query-Assistant
βββ data/
β βββ chunks/ # Contains text chunks (.pkl or .txt)
β βββ embeddings/ # Stores .npy embeddings and metadata
β βββ online_cache/
β βββ raw_papers/
β βββ texts/
β
βββ src/
β βββ pdf_processing/
β β βββ downloader.py # Handles paper downloads (CrossRef, etc.)
β β βββ extractor.py # Extracts text from PDFs
β βββ data collection/
β β βββ core_api.py # Handles paper downloads (CrossRef, etc.)
β β βββ crossref_api.py # Extracts text from PDFs
β βββ embeddings/
β β βββ embedder.py # SentenceTransformer embeddings
β β βββ chunker.py
β β βββ vector_store.py # FAISS vector database management
β βββ query_engine/
β β βββ rag_pipeline.py # Full retrieval + generation pipeline
β β βββ retriever.py
β
βββapp/
β βββ interface.py # Streamlit web interface
βββ requirements.txt
βββ README.md
git clone https://github.com/Rawda-Fathey/Research-Query-Assistant.git
cd Research-Query-Assistantpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtCreate a .env file in the project root and add your Groq API key:
GROQ_API_KEY=your_api_key_here
python src/query_engine/rag_pipeline.pyThis will:
- Load all stored document chunks.
- Compute or load embeddings.
- Retrieve the most relevant papers.
- Generate a summarized answer using Llama 3.3.
streamlit run src/interface.pyThen open http://localhost:8501 to interact with the assistant.
Query:
"What are the latest challenges in Artificial Intelligence?"
Response:
A synthesized, LLM-generated summary of recent AI challenges based on retrieved research papers.
If you added new PDFs or chunks:
python src/embeddings/embedder.pyThis generates embeddings and stores them in data/embeddings for retrieval.
- Python 3.10+
- SentenceTransformers
- FAISS
- Groq (Llama 3.3)
- Streamlit
- Requests, NumPy, JSON
- CrossRef / Semantic Scholar APIs