AskDocs AI is an AI-powered Streamlit application for interacting with text-based PDF documents. Users can upload a PDF, ask questions about its contents, generate concise summaries, and create multiple-choice quizzes from the document.
The application runs locally using Ollama and Llama 3, uses FAISS for semantic search, and uses Hugging Face Sentence Transformers to retrieve the most relevant document chunks before generating responses.
- 📄 PDF upload and text extraction
- 💬 Semantic question answering over uploaded PDFs
- 📝 Automatic document summary generation
- 🧪 Multiple-choice quiz generation with scoring
- 💡 Suggested questions in the sidebar
- 🤖 Local Llama 3 inference through Ollama
- 🔎 Semantic search using FAISS
- 🧠 Hugging Face Sentence Transformer embeddings
- ⚡ Cached embeddings and model resources for faster repeated use
- 🖥️ Interactive Streamlit user interface
- Python
- Streamlit
- LangChain
- LangChain Community Integrations
- LangChain Ollama Integration
- FAISS
- Hugging Face Sentence Transformers
- pypdf
- Ollama
- Llama 3
As a collaborative contributor to AskDocs AI, I worked on the following areas:
- 📄 Document Processing — Worked on PDF text extraction, document processing, and preparing content for the AI pipeline.
- 💬 Question Answering Integration — Contributed to integrating document-based question answering using retrieved PDF content.
- 📝 Summary Generation — Worked on generating concise summaries from uploaded document content.
- 🧪 Testing & Debugging — Tested application features, identified issues, and helped debug the system.
- 🤝 GitHub Collaboration — Collaborated on development, version control, and project updates using GitHub.
AskDocs AI was developed collaboratively.
- Rohit Kumar — Document Processing, Question Answering Integration, Summary Generation, Testing & Debugging
- Ankit Raj — Core Development and Project Contributions
DocuMind/
├── app.py
├── assets/
│ └── styles.css
├── components/
│ ├── chat_ui.py
│ ├── loaders.py
│ ├── quiz_ui.py
│ └── sidebar.py
├── utils/
│ ├── llm_handler.py
│ ├── pdf_reader.py
│ ├── prompts.py
│ ├── quiz_generator.py
│ ├── text_splitter.py
│ └── vector_store.py
├── requirements.txt
└── README.md
- Python 3.10 or newer
- Ollama installed locally
- The
llama3model pulled in Ollama
- Create and activate a virtual environment:
python3 -m venv venv
source venv/bin/activateOn Windows:
python -m venv venv
venv\Scripts\activate- Install Python dependencies:
pip install -r requirements.txt-
Install Ollama from ollama.com.
-
Pull the Llama 3 model:
ollama pull llama3- Start Ollama if it is not already running:
ollama serve- Run the app:
streamlit run app.py- A PDF is uploaded through the Streamlit interface.
pypdfextracts readable text from the document.- The text is split into overlapping chunks.
- Sentence Transformer embeddings are created for each chunk.
- FAISS stores the embedded chunks for similarity search.
- For normal questions, the app retrieves the most relevant chunks and sends them to Llama 3 through Ollama.
- For summary requests, the app summarizes a larger slice of the document.
- For quizzes, the app asks Llama 3 to generate validated multiple-choice questions from selected chunks.
- The app is designed for text-based PDFs. Scanned or image-only PDFs may not produce readable text.
- The default local model is
llama3, configured inutils/llm_handler.py. - The embedding model is
sentence-transformers/all-MiniLM-L6-v2, configured inutils/vector_store.py. - Quiz generation depends on the quality and amount of text extracted from the PDF.


