Skip to content

Danish08654/AI-Document-Analyzed-Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 AI-Powered RAG Document Analyzed System

An intelligent Retrieval-Augmented Generation application that enables users to upload PDF documents and ask questions in natural language. The system retrieves the most relevant information from uploaded documents and generates accurate, context-aware answers using Large Language Models.


Features

  • 📄 Upload one or multiple PDF documents
  • 🔍 Automatic document parsing and text extraction
  • ✂️ Intelligent text chunking
  • 🧠 Vector embeddings for semantic search
  • 📚 Vector database for efficient retrieval
  • 🤖 LLM-powered question answering
  • 💬 Interactive chat interface
  • ⚡ Fast and accurate context-aware responses
  • 🔄 Conversational memory (optional)
  • 📱 Clean and responsive web interface

🏗️ Architecture

                PDF Upload
                     │
                     ▼
            Text Extraction
                     │
                     ▼
             Text Chunking
                     │
                     ▼
         Embedding Generation
                     │
                     ▼
          Vector Database (FAISS)
                     │
         ┌───────────┴───────────┐
         │                       │
User Question             Similarity Search
         │                       │
         └───────────┬───────────┘
                     ▼
              Retrieved Context
                     │
                     ▼
            Large Language Model
                     │
                     ▼
             AI Generated Answer

🛠️ Tech Stack

Programming Language

  • Python

Frameworks

  • Streamlit
  • FastAPI

AI & LLM

  • LangChain
  • Groq
  • Hugging Face Transformers

Vector Database

  • FAISS

Embeddings

  • HuggingFace Embeddings
  • Sentence Transformers

Document Processing

  • PyPDF
  • PyMuPDF

Machine Learning

  • PyTorch

Run the Application

Streamlit

streamlit run app.py

FastAPI

uvicorn main:app --reload

📖 How It Works

  1. Upload PDF documents.
  2. The application extracts text from the PDFs.
  3. Text is divided into smaller chunks.
  4. Embeddings are generated for each chunk.
  5. Embeddings are stored in a FAISS vector database.
  6. When a user asks a question:
    • The query is converted into embeddings.
    • Relevant document chunks are retrieved.
    • Retrieved context is sent to the LLM.
  7. The LLM generates an accurate answer grounded in the uploaded documents.

Use Cases

  • 📚 Research Assistant
  • 📄 Legal Document Analysis
  • 🏥 Medical Knowledge Search
  • 🎓 Educational Q&A
  • 🏢 Enterprise Knowledge Base
  • 📑 Technical Documentation Search
  • 💼 Business Reports Analysis
  • 📖 Internal Company Documentation

Example Questions

Summarize this document.

What are the key findings?

Who is the author?

Explain Chapter 3.

What are the conclusions?

List the important dates.

What are the project requirements?

Compare the discussed approaches.

📊 Key Capabilities

  • Semantic Search
  • Retrieval-Augmented Generation (RAG)
  • Context-Aware Responses
  • PDF Document Understanding
  • Natural Language Question Answering
  • Vector Similarity Search
  • Scalable Knowledge Retrieval

🔮 Future Improvements

  • Multi-document chat
  • DOCX support
  • PowerPoint support
  • Image OCR support
  • Citation and source highlighting
  • Hybrid search (Keyword + Semantic)
  • Multi-language support
  • Authentication
  • Conversation history
  • Cloud deployment
  • Streaming responses
  • Agentic RAG workflows

🤝 Contributing

Contributions are welcome!

  1. Fork the repository.
  2. Create a feature branch.
  3. Commit your changes.
  4. Push the branch.
  5. Open a Pull Request.

📄 License

This project is licensed under the MIT License.


👨‍💻 Author

Danish Zulfiqar

AI Engineer |

If you found this project helpful, consider giving it a ⭐ on GitHub!

About

An AI-powered RAG system that allows users to upload documents and ask simple plain text questions.

Topics

Resources

License

Stars

3 stars

Watchers

0 watching

Forks

Contributors