How jay4ignite/nlp-cornerstone works
CampusNLP is a university-query assistant: students submit questions through a chat UI, the backend classifies intent and extracts academic entities, retrieves and reranks institutional evidence, then generates a cited answer or abstains when evidence is weak. The repository also documents ingestion, structured curriculum access, health and feedback capabilities. The graph reflects README-documented behavior and relationships visible in the sampled files or SOURCE INDEX; unsampled internals and some frontend-to-backend wiring are left unasserted.
Main entry points: pipeline.py Query pipeline · App.tsx Chat application · useConversations.ts Conversation state · retriever.py Hybrid retrieval
Components 24
Chat interface
- Chat application
src/App.tsx - Chat interface
src/components/Chat.tsx - Conversation state
src/hooks/useConversations.ts - API client
src/lib/api.ts - Saved conversations
src/lib/conversations.ts
Backend API
- HTTP endpoints
backend/main.py - Query pipeline
backend/pipeline.py - Grounding guardrails
backend/guardrails.py
Query understanding
- Text preprocessing
backend/nlp/preprocessing.py - Intent classifier
backend/nlp/intent_classifier.py - Entity extraction
backend/nlp/entity_extractor.py
Knowledge retrieval
- Resource ingestion
backend/data_ingestion/multi_resource_loader.py - PDF loading
backend/rag/pdf_loader.py - Document chunking
backend/rag/chunker.py - Embedding service
backend/rag/embeddings.py - Hybrid retrieval
backend/rag/retriever.py - Vector store adapter
backend/rag/vector_store.py - Vectorize store
backend/rag/cloudflare_vector_store.py - Evidence reranker
backend/rag/reranker.py - Answer generation
backend/rag/generator.py - Citation attribution
backend/rag/attribution.py
Other components
- Student
- NVIDIA NIM
- Cloudflare Vectorize
Connections 23
- Student → Chat application: asks question
README.md - Chat application → Chat interface: renders
src/App.tsx - Chat application → Conversation state: uses state
src/App.tsx - Conversation state → Saved conversations: loads and saves
src/hooks/useConversations.ts - Conversation state → API client: sends queries
src/hooks/useConversations.ts - API client → HTTP endpoints: calls endpoints
- HTTP endpoints → Query pipeline: processes query
backend/main.py - Query pipeline → Intent classifier: classifies intent
backend/pipeline.py - Intent classifier → Text preprocessing: preprocesses text
backend/nlp/intent_classifier.py - Query pipeline → Entity extraction: extracts entities
backend/pipeline.py - Query pipeline → Hybrid retrieval: retrieves evidence
backend/pipeline.py - Hybrid retrieval → Embedding service: embeds query
backend/rag/retriever.py - Hybrid retrieval → Vector store adapter: searches vectors
backend/rag/retriever.py - Vector store adapter → Vectorize store: delegates storage
backend/rag/vector_store.py - Query pipeline → Evidence reranker: reranks evidence
backend/pipeline.py - Query pipeline → Grounding guardrails: checks grounding
backend/pipeline.py - Query pipeline → Answer generation: generates answer
backend/pipeline.py - Query pipeline → Citation attribution: scores citations
backend/pipeline.py - Embedding service → NVIDIA NIM: requests embeddings
backend/rag/embeddings.py - Vectorize store → Cloudflare Vectorize: queries remote index
- Resource ingestion → Embedding service: creates embeddings
backend/data_ingestion/multi_resource_loader.py - Resource ingestion → Vectorize store: loads vectors
backend/data_ingestion/multi_resource_loader.py - PDF loading → Document chunking: loads then chunks