Skip to content

feat: add LLMCategoriser DSPy-style component with contract testing - #3

Merged
rprabhat merged 1 commit into
mainfrom
feat/llm-categoriser-component
Apr 18, 2026
Merged

feat: add LLMCategoriser DSPy-style component with contract testing#3
rprabhat merged 1 commit into
mainfrom
feat/llm-categoriser-component

Conversation

@rprabhat

Copy link
Copy Markdown
Contributor

Summary

  • Add LLMCategoriser with explicit input/output Pydantic signatures
  • Add contract validation functions
  • Integrate into categorise.py as drop-in replacement for LLM calls
  • Add 21 contract tests, all 28 tests pass

Changes

  • services/llm_categoriser.py - New DSPy-style component
  • services/categorise.py - Integrated new module
  • tests/test_llm_categoriser.py - Contract tests

- Add llm_categoriser.py with explicit input/output Pydantic signatures
- Add contract validation functions (validate_input, validate_output)
- Integrate into categorise.py as drop-in replacement for LLM calls
- Add 21 contract tests covering validation, parsing, contracts, E2E
- All 28 tests pass (21 new + 7 existing)
@vercel

vercel Bot commented Apr 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
smart-gl Building Building Preview, Comment Apr 18, 2026 6:16am

@rprabhat
rprabhat merged commit 54fba73 into main Apr 18, 2026
3 of 5 checks passed
@rprabhat
rprabhat deleted the feat/llm-categoriser-component branch April 18, 2026 06:16
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.

1 participant