How sofyc/conquer works
Project type and purpose
• ConQuer is a stand-alone Python framework (CLI tool) whose sole purpose is to generate, assemble, and evaluate concept-based quizzes.
• It consists of four independent “mini-applications” (question generator, concept generator, full-quiz generator, and evaluator) that can be run separately or chained together.
File structure
Top-level files and directories:
• .gitignore, requirements.txt – typical Python project files.
• generate_concept.py – drive script for concept generation.
• generate_question.py – drive script for question generation.
• wiki.py – orchestrator that uses concepts + questions to build a quiz.
• evaluation.py – drive script for evaluating quiz quality.
• *.json files (concepts.json, questions.json, wiki.json, quiz_concept_wiki.json, areas.txt) – on-disk data store for intermediate inputs/outputs.
README for additional insights
• Dependencies: OpenAI and Gemini APIs accessed via environment variables.
• Usage: each step is invoked via its own Python entry point.
• No external database; data flows through flat JSON files.
a. Main components
1. CLI Entry Points
– generate_concept.py
– generate_question.py
– wiki.py (full-pipeline orchestrator)
– evaluation.py
2. Local JSON Data Store
– concepts.json, questions.json, wiki.json, quiz_concept_wiki.json, areas.txt
3. External Services
– OpenAI API
– Gemini API
4. Environment Variables
– OPENAI_API_KEY
– GEMINI_API_KEY
b. Relationships and interactions
– Each CLI script reads from and writes to specific JSON files.
– Scripts call out to external APIs (OpenAI, Gemini) to perform NLP tasks.
– The orchestrator (wiki.py) ties together the output of generate_concept.py and generate_question.py to produce final quiz JSON.
– evaluation.py reads the generated quiz JSON and may call APIs or local heuristics to score the quiz.
c. Architectural patterns/design principles
– Pipeline pattern: each stage is decoupled and can be run independently.
– Separation of concerns: concept generation, question generation, quiz assembly, and evaluation are separate modules.
– Data-driven: JSON files act as both input and output, making the system extensible and easy to debug.
d. Key technologies/frameworks/libraries
– Python 3.x
– OpenAI Python SDK (for GPT calls)
– Gemini API client
– JSON for serialization