How mallikarjun1520/tcs_hack works
This is an AI DevOps incident-analysis advisor. A user uploads a log through the browser; the API parses it, retrieves similar historical incidents, asks an LLM to produce a structured assessment, and returns the assessment and matches for display. A separate ingestion script embeds the incident corpus into persistent Chroma storage used by retrieval. The map follows the sampled runtime and ingestion code; the README is empty, and several listed modules were not sampled.
Main entry points: main.py Analyze endpoint · script.js Upload and results · ingest.py Corpus ingestion · retrieval.py Similar incident search
Components 12
User interface
- Upload and results
frontend/script.js
Analysis workflow
- Analyze endpoint
app/main.py - Log parser
app/services/parser.py - Incident reasoning
app/services/llm_service.py
Incident knowledge
- Similar incident search
app/services/retrieval.py - Text embeddings
app/services/retrieval.py - Incident vector store
chroma_db - Incident corpus
incidents.json - Corpus ingestion
ingest.py - Ingestion embeddings
ingest.py
Other components
- Incident analyst
- Groq LLM service
Connections 13
- Incident analyst → Upload and results: uploads log
- Upload and results → Analyze endpoint: posts file
frontend/script.js - Analyze endpoint → Log parser: parses upload
app/main.py - Analyze endpoint → Similar incident search: searches matches
app/main.py - Analyze endpoint → Incident reasoning: requests analysis
app/main.py - Similar incident search → Text embeddings: encodes query
app/services/retrieval.py - Similar incident search → Incident vector store: queries vectors
app/services/retrieval.py - Incident reasoning → Groq LLM service: requests completion
app/services/llm_service.py - Analyze endpoint → Upload and results: returns results
app/main.py - Upload and results → Upload and results: renders results
frontend/script.js - Corpus ingestion → Incident corpus: reads incidents
ingest.py - Corpus ingestion → Ingestion embeddings: encodes records
ingest.py - Corpus ingestion → Incident vector store: writes vectors
ingest.py