How rclalithkumar/opslens works
OpsLens is a Streamlit incident-investigation copilot. Engineers submit an incident; the analyzer retrieves internal evidence, checks its sufficiency, optionally searches the public web, and asks an LLM to produce a grounded investigation with hypotheses, evidence gaps, diagnostic checks, and confirmation status. The UI also presents evidence and an investigation trace. The graph follows shown calls and README-described workflow; unsampled implementation details are not inferred.
Main entry points: incident_analyzer.py Incident analyzer · retriever.py Semantic retriever · app.py Streamlit investigation UI · web_search.py Web search
Components 17
Investigation interface
- Streamlit investigation UI
app.py
Investigation reasoning
- Incident analyzer
utils/incident_analyzer.py - Evidence sufficiency
utils/evidence_sufficiency.py - Evidence formatting
utils/evidence.py - Investigation prompts
utils/prompts.py
Internal knowledge retrieval
- Semantic retriever
utils/retriever.py - PDF document loader
utils/document_loader.py - Text chunking
utils/text_splitter.py - Embedding model
models/embeddings.py - Persistent FAISS store
utils/vector_store.py - Knowledge-base preparation
create_knowledge_base.py
External integrations
- LLM client
models/llm.py - Groq
- Web search
utils/web_search.py - DuckDuckGo
- Search settings
config/config.py
Other components
- Engineer
Connections 17
- Engineer → Streamlit investigation UI: submits incident
README.md - Streamlit investigation UI → Incident analyzer: starts investigation
README.md - Incident analyzer → Semantic retriever: retrieves evidence
utils/incident_analyzer.py - Semantic retriever → PDF document loader: loads PDFs
utils/retriever.py - Semantic retriever → Text chunking: chunks text
utils/retriever.py - Semantic retriever → Embedding model: encodes text
utils/retriever.py - Semantic retriever → Persistent FAISS store: searches and persists
utils/retriever.py - Incident analyzer → Evidence sufficiency: assesses evidence
utils/incident_analyzer.py - Incident analyzer → Web search: searches if insufficient
utils/incident_analyzer.py - Web search → Search settings: reads settings
utils/web_search.py - Web search → DuckDuckGo: queries
utils/web_search.py - Incident analyzer → Evidence formatting: formats evidence
utils/incident_analyzer.py - Incident analyzer → Investigation prompts: builds prompt
utils/incident_analyzer.py - Incident analyzer → LLM client: requests investigation
utils/incident_analyzer.py - LLM client → Groq: sends completion
models/llm.py - Streamlit investigation UI → Evidence formatting: formats display
app.py - Knowledge-base preparation → Persistent FAISS store: prepares knowledge base