SAT Q&A: Question Answering System based on Google Palm LLM and langchain for SAT questions on world_history and us_history
This is an end to end LLM project based on Google Palm and Langchain. I have built a Q&A system for students preparing for SAT examination. SAT is a standardized test widely used for college admissions in the United States. This system will provide a streamlit based user interface for students where they can ask questions and get answers. Currently the application is focused on questions related to us_history and world_history
SAT.QA.Demo.mp4
- Use a real CSV file of SAT Question and Answers on us_history and world_history.
- Student who are attempting the SAT exam refer previous year paper for practice.
- I built an LLM based question and answer system that can reduce the workload of searching answers.
- Students should be able to use this system to ask questions directly and get answers within seconds.
- Langchain + Google Palm: LLM based Q&A
- Streamlit: UI
- Huggingface instructor embeddings: Text embeddings
- FAISS: Vector database
- Clone this repository to your local machine using:
git clone https://github.com/MaruthiKo/SAT_QA.git
- Navigate to the project directory:
cd SAT_QA
- Install the required dependencies using pip:
pip install -r requirements.txt
- Acquire an api key through makersuite.google.com and put it in .env file
GOOGLE_API_KEY="your_api_key_here"
- Run the Streamlit app by executing:
streamlit run main.py
- The web app will open in your browser.
- To create knowledge base uncomment the line in langchain_helper, create vector_db. It will take some time before knowledgebase is created so please wait.
- Once knowledge base is created you will see a directory called
faiss_index
in your current folder. - Now you are ready to ask questions. Type your question in Question box and hit Enter
- The Kush city of Meroe rose to prominence mainly because of its natural supply of
- Usage of the Silk Roads for trade declined near the end of the Han dynasty primarily due to
- The Seven Years' War was MOST beneficial for which nation?
- The Louisiana Purchase provided France with significant funding for
- President Johnson called for a voting rights bill in 1965 after
- main.py: The main Streamlit application script.
- langchain_helper.py: This has all the langchain code
- requirements.txt: A list of required Python packages for the project.
- .env: Configuration file for storing your Google API key.