๐Ÿ’ก Inspiration

While navigating through dense research papers ๐Ÿ“„, legal documents โš–๏ธ, and lengthy technical manuals ๐Ÿง , we found ourselves endlessly skimming and scrolling ๐Ÿ˜ฉ. The traditional PDF readers felt static and unhelpful. So, we thought โ€” what if your documents could talk back? ๐Ÿ—ฃ๏ธ Thatโ€™s how AskMyDoc was born โ€” a smart, interactive PDF assistant ๐Ÿงžโ€โ™‚๏ธ that helps users truly understand rather than just read their documents.


๐Ÿš€ What it does ๐Ÿ’ช

AskMyDoc is your AI-powered reading companion ๐Ÿค–๐Ÿ“š. Hereโ€™s what it brings to the table:

  • ๐Ÿ“ค Upload any PDF document
  • ๐Ÿ–ฅ๏ธ View it in a split-screen PDF reader
  • ๐Ÿ’ฌ Ask questions about the whole document or specific pages
  • ๐Ÿ“„ Get context-aware, accurate answers that reference page numbers
  • ๐Ÿง  Maintains a chat history linked to your reading journey
  • ๐Ÿงญ Like having an expert co-reader guiding you in real-time

๐Ÿ› ๏ธ How we built it ๐Ÿงช

  • Frontend: Built with Streamlit ๐Ÿง‘โ€๐ŸŽจ for a clean and interactive split-screen interface ๐Ÿ“‘๐Ÿ’ฌ.
  • Backend: FastAPI handles uploads, routing, and real-time responses โš™๏ธ.
  • PDF Processing: PyMuPDF extracts text from each page quickly and efficiently ๐Ÿƒโ€โ™‚๏ธ.
  • Embeddings: Open AI Embeddings
  • Vector Database: FAISS database to store vector embeddings of the PDF.

    • Page-level and full-document embeddings created ๐Ÿงฉ
    • Stored in vector databases for accurate semantic retrieval ๐Ÿ”๐Ÿ“ฆ
  • LLM Agent: Integrated a ReAct(Reasoning and Action)-style agent ๐Ÿง  using OpenAI APIs to answer, reason, and clarify ๐Ÿ”„.

  • State Management: Chat history tracked ๐Ÿ•ฐ๏ธ with roles and page metadata, for a more personalized feel ๐Ÿ‘ฅ๐Ÿ“˜.


โš”๏ธ Challenges we ran into ๐Ÿง—โ€โ™‚๏ธ

  • ๐Ÿงฉ Balancing page-level vs full-document embeddings without leaking context.
  • ๐Ÿ•‘ Keeping latency low even with huge PDFs and long chats.
  • ๐ŸŽจ Designing a distraction-free UI that blends clarity and interactivity.

๐Ÿ† Accomplishments that we're proud of ๐ŸŽ‰

  • ๐ŸŽฏ Built an end-to-end RAG (Retrieval-Augmented Generation) pipeline.
  • ๐Ÿ“– Developed a ReAct agent that not only answers but thinks and reasons.
  • ๐Ÿงผ Created a smooth, intuitive UI merging reading & real-time assistance.
  • ๐Ÿ“Ž Linked chat history to document structure for seamless reference.

๐Ÿ“š What we learned ๐Ÿ‘จโ€๐ŸŽ“

  • How to build a full-stack LLM-powered app from scratch ๐Ÿ—๏ธ.
  • Deep understanding of document chunking ๐Ÿ“„ vs global context ๐ŸŒ.
  • Learned to blend AI capabilities with thoughtful UX for better collaboration ๐Ÿ‘ฅโœจ.

๐Ÿ”ฎ Whatโ€™s next for AskMyDoc ๐Ÿš€

  • ๐Ÿ—‚๏ธ Multi-document support: Compare and query across multiple PDFs!
  • ๐Ÿ“ด Offline mode: Use open-source LLMs locally for privacy and speed ๐Ÿ›ก๏ธ.
  • ๐Ÿ–Š๏ธ Interactive annotations: Get answers linked to text and export highlights!

Built With

  • fastapi
  • streamlit
Share this project:

Updates