AskGMP is an AI chatbot for GMP regulatory documents with evidence-based answers and page-level citations. This project serves as a starter kit for building chatbots for internal SOPs, using CAG and hybrid RAG for enhanced retrieval.

AskGMP is an AI-powered chatbot that lets you ask questions about pharmaceutical GMP regulations and receive evidence-based answers with document references and page-level citations.
The reference application uses approximately 90 public regulatory documents from EudraLex, ICH, FDA, EMA, MHRA, PIC/S, and WHO. You can also upload your own documents, ask questions about their content, and explore the supporting references.
More than a chatbot, AskGMP is a free, open-source starter kit for building similar AI solutions using your own knowledge base, such as internal SOPs, quality documents, or technical documentation.
What Makes AskGMP Different?
When working with regulatory or internal company documents, getting an answer is not enough. You need to know where the information comes from and whether you can verify it.
AskGMP focuses on traceable, document-grounded answers, with features including:
Evidence-based answers: Responses are generated using relevant content from the available documents.
Page-level citations: Identify the documents and pages supporting each answer.
Validated references: Citations are checked against the source material supplied to the model, reducing the risk of fabricated references.
Source transparency: Review supporting documents in a structured reference table.
Document uploads: Upload your own files and ask questions about their content.
The goal isn't just to get an answer. It's to understand where the answer comes from and how to verify it.
AskGMP is source code provides a starting point for developing your own document-based AI chatbot.
For example, you could adapt it to build:
Internal SOP Assistant: Help employees find information across company procedures and operational guidelines.
Quality Management Assistant: Search internal quality documents and support QA knowledge discovery.
Regulatory Knowledge Assistant: Make regulatory guidance easier to search and reference.
Technical Documentation Chatbot: Build a question-answering system for manuals, policies, or other document collections.
Instead of building everything from scratch, you can explore and reuse AskGMP's document processing, retrieval, prompt caching, and citation validation components.
The architecture can be adapted to other industries and document-heavy use cases.
AskGMP demonstrates how Cache-Augmented Generation (CAG) and Retrieval-Augmented Generation (RAG) can work together to improve document coverage and retrieval reliability.
The architecture combines two approaches:
Cache-Augmented Generation (CAG): Keeps 15 frequently used GMP regulatory documents in the model's prompt-cached context, making their content directly available without depending on retrieval ranking.
Hybrid RAG: Combines semantic and keyword search using Qdrant and Reciprocal Rank Fusion (RRF) to retrieve relevant information from the remaining knowledge base.
This hybrid approach helps address situations where traditional RAG might miss an important document because its relevant passages are not ranked highly enough.
Explore the application with questions such as:
What does EU GMP require for deviation investigations?
What are the requirements for audit trails under Annex 11?
How long should batch manufacturing records be retained?
What does ICH Q9(R1) say about quality risk management?
You can also upload a document, ask questions about its content, and inspect the supporting references.
💻 For AI Engineers and Developers
Use AskGMP as a starter kit for your next document-based AI application. Replace the regulatory knowledge base with your own documents, experiment with retrieval strategies, and extend the architecture with features relevant to your use case.
🧪 For Pharmaceutical Professionals
Explore how an AI-powered knowledge assistant could help your teams navigate GMP regulations, internal SOPs, and quality documentation. The project offers a practical starting point for evaluating similar solutions within your organization.
Disclaimer: AskGMP is an AI engineering tutorial and demonstration. It is not a validated GMP compliance system or a substitute for qualified regulatory judgment. Applications handling internal company documents require appropriate security, access controls, validation, and human review.
Need a similar solution for your organization?
Contact me to discuss how a tailored solution could be implemented in your environment, including regulatory review and validation requirements.