Skip to content

[LLM] Create LLM feature documentation#433

Merged
gelluisaac merged 2 commits into
Traqora:mainfrom
Johnpii1:issue-403
Jun 28, 2026
Merged

[LLM] Create LLM feature documentation#433
gelluisaac merged 2 commits into
Traqora:mainfrom
Johnpii1:issue-403

Conversation

@Johnpii1

Copy link
Copy Markdown
Contributor

Description

Description
Add LLMFeedback ORM model to persist feature, prompt, output, rating, expert flag/weight and timestamps (api/models/orm.py).
Add LLM feedback request/response schemas and dashboard/prompt-improvement models (api/schemas.py) and validate inputs (LLMFeedbackIn / LLMFeedbackOut).
Expose feedback APIs on the LLM router: POST /api/v1/llm/feedback, GET /api/v1/llm/feedback/dashboard, and GET /api/v1/llm/feedback/prompt-improvements with aggregation/weighted metrics (api/routers/llm.py).
Add deterministic LLM mocking helpers with latency, token/cost accounting and injectable failures for chaos testing (api/tests/llm_mocking.py).
Add golden regression cases and an integration test suite that enforces p95 latency gate, mock-cost gates, chaos behavior and feedback/dashboard flows (api/tests/llm_golden/ask_cases.json, api/tests/test_llm_integration_quality.py).
Document public LLM endpoints, usage examples, testing guidance and troubleshooting in docs/llm/features.md.

Testing
Successfully compiled the modified modules with python -m py_compile api/routers/llm.py api/routers/feedback.py api/models/orm.py api/schemas.py api/tests/test_llm_integration_quality.py api/tests/llm_mocking.py and no syntax errors were reported.
Ran pytest ... invocation for the LLM integration tests but it was blocked by missing dependency fastapi (test collection failed with ModuleNotFoundError: No module named 'fastapi'), so the full pytest suite could not be executed in the current environment.
Unit-level sanity checks (file compilation) passed; the new integration tests and endpoints are present and ready to run in CI or a dev environment with required dependencies installed.

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)
close #403

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Johnpii1 added 2 commits June 28, 2026 21:41
…r-llm-features

Add LLM feedback endpoints, deterministic LLM mocking, and integration tests
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@Johnpii1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@gelluisaac gelluisaac merged commit 8b5ed68 into Traqora:main Jun 28, 2026
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.

[LLM] Create LLM feature documentation

2 participants