Don't just read the textbook—master it. GenCertQuiz is the open-source engine powering Hiiragi Exam. It uses a sophisticated RAG-powered Multi-Agent system to analyze your study materials and generate high-quality, exam-style quizzes that mimic real certification standards.
Check out the official platform built on top of this repository: Hiiragi Exam
Most AI quiz generators just rephrase text. GenCertQuiz acts like a professional exam board:
- The Researcher deep-dives into facts.
- The Style Analyzer mimics the tone of specific exams (e.g., AWS SAA-C03).
- The Critic ensures no hallucinations and high academic rigor.
-
🤖 Multi-Agent RAG Pipeline
- Researcher Agent: Extracts core facts and definitions from uploaded textbooks.
- Style Analyzer: Analyzes uploaded exam papers to extract question patterns, difficulty, and tone.
- Psychometrician Agent: Drafts questions that combine factual accuracy with exam-style formatting.
- Critic Agent: Reviews and refines questions to ensure quality and remove hallucinations.
-
📚 Content Management
- PDF Ingestion: Upload textbooks and exam papers (text & vision analysis).
- File Management: View and delete uploaded files.
- Vector Search: Semantic retrieval using
pgvector.
-
📝 Interactive Quiz
- Generate quizzes with adjustable difficulty.
- Real-time feedback and explanations.
- Backend: FastAPI, Python 3.11+, Pydantic AI Agents
- AI/ML: OpenAI GPT-4o, Anthropic Claude 3.5 Sonnet
- Database: PostgreSQL with
pgvector - Frontend: Next.js 14, React, Tailwind CSS, Lucide Icons
- Infrastructure: Docker Compose
graph TD
User[User] -->|Uploads PDF| InpestAPI[Ingest API]
User -->|Requests Quiz| GenAPI[Generate API]
subgraph "Data Layer"
Postgres[(PostgreSQL + pgvector)]
end
subgraph "Agentic RAG Engine"
Researcher[Researcher Agent]
StyleAnalyzer[Style Analyzer]
Psychometrician[Psychometrician Agent]
Critic[Critic Agent]
end
InpestAPI -->|Chunks & Embeds| Postgres
InpestAPI -->|Extracts Style| StyleAnalyzer
StyleAnalyzer -->|Caches Profile| Postgres
GenAPI --> Researcher
Researcher -->|Retrieves Facts| Postgres
Researcher -->|Facts| Psychometrician
StyleAnalyzer -->|Style Profile| Psychometrician
Psychometrician -->|Drafts Question| Critic
Critic -->|Feedback| Psychometrician
Critic -->|Approved Question| User
The easiest way to run the application is using Docker Compose, which handles the frontend, backend, and database.
- Docker & Docker Compose
- API Keys (OpenAI, Anthropic)
Create a .env file in the backend/ directory (or rely on the default docker-compose.yml mapping):
# Copy example env in backend
cp backend/.env.example backend/.env
# Edit backend/.env to add your API keysdocker-compose up --buildAccess the application:
- Frontend: http://localhost:3000
- Backend API Docs: http://localhost:8000/docs
If you want to run services individually for development:
docker-compose up -d dbcd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
cp .env.example .env # Add your API keys
uvicorn main:app --reload --port 8000cd frontend
npm install
npm run dev