How kb-dhanush/demo-inkgrader works
InkGrader is a Streamlit app for teachers to upload reference notes, enter a question and teacher/student answers, and receive an AI-generated score with reasoning and evidence. The workflow ingests PDF/TXT materials into a Chroma knowledge base, retrieves relevant chunks during evaluation, and displays the parsed result. The source shows these calls and data transfers; finer details of library internals are not represented.
Main entry points: grader.py Answer Evaluation · streamlit_app.py Streamlit Workflow · ingest.py File Ingestion
Components 15
Grading App
- Streamlit Workflow
streamlit_app.py - Uploaded Notes
- Evaluation Result
Knowledge Base
- File Ingestion
ingest.py - PDF/TXT Loader
ingest.py - Text Chunking
ingest.py - HuggingFace Embeddings
ingest.py - Chroma Store
ingest.py
Evaluation
- Answer Evaluation
grader.py - Knowledge Base Loader
grader.py - Context Retrieval
grader.py - Evaluation Prompt
grader.py - Gemini Model
- JSON Result Parsing
grader.py
Other components
- Teacher or Student
Connections 22
- Teacher or Student → Streamlit Workflow: provides inputs
- Streamlit Workflow → Uploaded Notes: saves upload
- Streamlit Workflow → File Ingestion: calls ingestion
- File Ingestion → PDF/TXT Loader: selects loader
- PDF/TXT Loader → Text Chunking: provides documents
- File Ingestion → HuggingFace Embeddings: creates embeddings
- File Ingestion → Chroma Store: stores chunks
- Text Chunking → Chroma Store: provides chunks
- Streamlit Workflow → Answer Evaluation: calls evaluation
- Answer Evaluation → Knowledge Base Loader: loads store
- Knowledge Base Loader → HuggingFace Embeddings: creates embeddings
- Knowledge Base Loader → Chroma Store: opens store
- Answer Evaluation → Context Retrieval: searches store
- Context Retrieval → Chroma Store: similarity search
- Context Retrieval → Evaluation Prompt: supplies context
- Answer Evaluation → Evaluation Prompt: supplies answers
- Answer Evaluation → Gemini Model: invokes model
- Evaluation Prompt → Gemini Model: formats request
- Answer Evaluation → JSON Result Parsing: parses response
- JSON Result Parsing → Evaluation Result: returns evaluation
- Answer Evaluation → Evaluation Result: returns parse error
- Streamlit Workflow → Evaluation Result: displays result