Skip to content

Add safety intelligence schemas and refinery RAG knowledge base - #3

Closed
Ashish331-naik wants to merge 5 commits into
mainfrom
feature/intelligence-schemas
Closed

Add safety intelligence schemas and refinery RAG knowledge base#3
Ashish331-naik wants to merge 5 commits into
mainfrom
feature/intelligence-schemas

Conversation

@Ashish331-naik

Copy link
Copy Markdown
Collaborator

Summary

Adds the schema contracts and refinery-safety RAG foundation for SpecGuard.

Changes

  • Added shared safety enums and validated Pydantic schemas
  • Added contracts for shift logs, extracted safety events, historical incidents, risk-engine input, evidence, recommendations, and intelligence responses
  • Added PDF, Markdown, and text document ingestion
  • Added conservative cleaning and deterministic chunking
  • Added safety metadata enrichment
  • Added local embedding and persistent vector retrieval support
  • Added six synthetic refinery SOPs
  • Added authorized refinery incident and safety documents
  • Added manifest-based document management
  • Added RAG CLI commands for ingestion and retrieval
  • Added tests and beginner-friendly documentation

Validation

  • 35 backend tests passed
  • 18/18 documents loaded
  • 72 chunks created and indexed
  • Retrieval smoke test returned relevant:
    • hot-work guidance
    • gas-testing guidance
    • equipment-isolation guidance
    • evacuation guidance

Safety

  • Synthetic SOPs are clearly labelled as prototypes
  • Recommendations remain human-approved
  • No paid LLM API is required for ingestion or retrieval

@Ashish331-naik

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

1 similar comment
@Ashish331-naik

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

Copilot stopped work on behalf of Ashish331-naik due to an error July 22, 2026 12:15
@Ashish331-naik
Ashish331-naik deleted the feature/intelligence-schemas branch July 22, 2026 12:15
@Ashish331-naik
Ashish331-naik restored the feature/intelligence-schemas branch July 22, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants