← all repositories
mobarski/ask-my-pdf

Board game rules, decoded by two research papers and your credit card

A Streamlit app that answers questions about PDFs by combining two recent retrieval-augmented generation techniques—primarily so the author doesn't lose at board games.

599 stars Python RAG · SearchLanguage Models
ask-my-pdf
Not currently ranked — collecting fresh signals.
star history

What it does

Upload a PDF, ask a question, get an answer generated by GPT-3. The app is built for Streamlit Community Cloud and requires users to bring their own OpenAI API key. The author openly admits the primary motivation: settling board game rule disputes without flipping through manuals.

The interesting bit

Instead of dumping the whole PDF into the context window, the app implements two 2022-2023 research papers: RALM (retrieval-augmented in-context learning) and HyDE (Hypothetical Document Embeddings), which generates a fake ideal answer to improve retrieval. The README includes architecture diagrams showing how these pieces fit together—rare diligence for a 600-star side project.

Key highlights

  • Implements RALM + HyDE from recent academic papers, not just “stuff all text into GPT-3”
  • Multiple storage backends: local filesystem, S3, or in-memory dict
  • Embeddings cache can persist to disk or S3 to save API costs
  • Usage stats and feedback can route through Redis
  • Configurable per-user budgets for community deployments

Caveats

  • Explicitly labeled a Proof of Concept with “bugs or unfinished features”
  • Requires your own OpenAI API key; no free tier, no self-hosted model option
  • No information on supported PDF types, chunking strategy, or maximum document size

Verdict

Worth a look if you’re studying RALM/HyDE implementations or need a quick PDF Q&A prototype. Skip it if you want production reliability, open-source models, or a solution that doesn’t meter your OpenAI spend.

Frequently asked

What is mobarski/ask-my-pdf?
A Streamlit app that answers questions about PDFs by combining two recent retrieval-augmented generation techniques—primarily so the author doesn't lose at board games.
Is ask-my-pdf open source?
Yes — mobarski/ask-my-pdf is open source, released under the MIT license.
What language is ask-my-pdf written in?
mobarski/ask-my-pdf is primarily written in Python.
How popular is ask-my-pdf?
mobarski/ask-my-pdf has 599 stars on GitHub.
Where can I find ask-my-pdf?
mobarski/ask-my-pdf is on GitHub at https://github.com/mobarski/ask-my-pdf.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.