Building a Conversational Assistant for Ready Tensor Publications
What I Built
I created a chatbot that helps people explore Ready Tensor publications through natural conversation. Instead of traditional keyword searches, users can ask questions in plain English and get answers that are backed by actual publications. Think of it as having a knowledgeable research assistant who can quickly find and explain relevant papers.
How I Built It
The Core Components
I broke down the system into four main parts:
-
The Memory System (Vector Store)
- I chose FAISS for storing and searching through publication embeddings
- It's like having a smart filing system that can find similar documents quickly
- I used sentence-transformers to convert text into meaningful numerical representations
-
The Search Engine (Retrieval System)
- This is where the magic happens - it finds the most relevant publications for each question
- I implemented semantic search, which means it understands the meaning behind words, not just the words themselves
- It keeps track of where information comes from, so we can always show our sources
-
The Brain (Answer Generation)
- I integrated Google's Gemini model to understand questions and generate answers
- It's trained to use only the information from the retrieved publications
- This ensures answers are accurate and grounded in real content
-
The Interface
- I built a clean, simple interface using Streamlit
- The focus is on the current question and answer, making it easy to follow
How to Use It
Getting started is straightforward:
-
Install the requirements:
pip install -r requirements.txt
-
Set up your Gemini API key (you can get one from Google AI Studio):
export GOOGLE_API_KEY=your-key-here
-
Build the vector store:
python build_vector_store.py
-
Start the app:
streamlit run app.py
The Tech Stack
The project uses these main tools:
- streamlit (for the interface)
- google-generativeai (for the language model)
- faiss-cpu (for vector search)
- sentence-transformers (for text embeddings)