docs: add semantix-ai integration page#25490
Conversation
Adds MDX integration guide for semantix-ai — a semantic type system that validates LLM outputs against natural language intents using local NLI models (~15ms, zero API cost). Works with all LiteLLM-supported providers via litellm.completion(). Also registers the page in the Agent SDKs sidebar section alongside the existing letta entry.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR adds a documentation page for Confidence Score: 5/5Documentation-only PR with no code changes; safe to merge. Both issues from the prior review round (unused MDX imports, global api_base mutation) have been removed. All remaining observations are purely style-level and do not block merge. No files require special attention.
|
| Filename | Overview |
|---|---|
| docs/my-website/docs/integrations/semantix.md | New integration doc for semantix-ai; clean MDX (no unused imports, no global mutations), code examples are consistent and coherent. |
| docs/my-website/sidebars.js | Single line addition registering integrations/semantix in the Agent SDKs & integrations sidebar section, consistent with neighbouring entries like integrations/letta. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["User Code"] -->|"@validate_intent"| B["semantix-ai decorator"]
B -->|"litellm.completion()"| C["LiteLLM Router"]
C -->|"API call"| D["LLM Provider\n(OpenAI / Anthropic / Azure / etc.)"]
D -->|"raw text response"| C
C -->|"response.choices[0].message.content"| B
B -->|"NLI inference\n(~15 ms, local)"| E{"Intent match?"}
E -->|"Yes"| F["Return result to caller"]
E -->|"No, retries left"| G["Inject semantix_feedback\ninto next prompt"]
G --> B
E -->|"No, retries exhausted"| H["Raise SemanticIntentError"]
B -->|"collector present"| I["TrainingCollector\n(JSONL log)"]
Reviews (2): Last reviewed commit: "fix: rewrite with correct semantix-ai AP..." | Re-trigger Greptile
| import Tabs from '@theme/Tabs'; | ||
| import TabItem from '@theme/TabItem'; |
There was a problem hiding this comment.
Tabs and TabItem are imported but never used anywhere in the document. In Docusaurus MDX these unused imports generate build warnings and, depending on the ESLint/MDX configuration, can cause CI failures. Remove them unless tab-based examples are planned.
| import Tabs from '@theme/Tabs'; | |
| import TabItem from '@theme/TabItem'; |
| from semantix import validate_intent | ||
|
|
||
| # Point LiteLLM SDK at your proxy | ||
| litellm.api_base = "http://localhost:4000" |
There was a problem hiding this comment.
Global
api_base mutation in example code
Setting litellm.api_base at module level mutates a global that affects every subsequent litellm.completion() call in the same process. The idiomatic LiteLLM proxy approach is to pass api_base per-call or use environment variables. As written, the example could mislead users into inadvertently routing all their calls through the proxy. Consider using the per-call form:
| litellm.api_base = "http://localhost:4000" | |
| response = litellm.completion( | |
| model="gpt-4", | |
| api_base="http://localhost:4000", | |
| messages=[...], | |
| ) |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
|
|
Tip: Greploop — Automatically fix all review issues by running Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal. |
|
Quick update from my side, plus a question for the maintainers. Diagnosis on the failing But: the rebase reveals the docs structure has been substantially restructured since this PR was filed:
semantix-ai isn't an LLM provider or a proxy config — it's a complementary validator that consumes LLM outputs (post-generation NLI check on Happy to refile against whatever the right path is, or to close this cleanly if non-provider integrations are out of scope for the LiteLLM monorepo's docs going forward. Either way I appreciate the maintainership. (For context, semantix-ai is on PyPI as |
Summary
PyPI: pypi.org/project/semantix-ai
Repository: github.com/labrat-akhona/semantix-ai