Repository navigation
w3bs ask legal: sources-only prompt, never invent cases; 220-token cap - #282
Merged
Merged
Conversation
Live test of the legal agent through /api/v1/ask invented a Texas Supreme Court justice and three rulings. The stricter prompt (answer only from the numbered sources, never invent cases, judges, statutes, dates or numbers, under 120 words, end with a licensed attorney) produced no invented authorities in the same and a second question on the same adapter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A live
/api/v1/asktest of the newlegalagent (#280) invented a Texas Supreme Court justice and three rulings. That is the worst failure for a legal agent.The new system prompt: answer only from the numbered sources and cite them like [1]; never invent court cases, judges, statutes, dates or numbers; say so when the sources do not answer; name the jurisdiction; under 120 words; end by suggesting a licensed attorney.
max_tokens350 to 220 (the long answers were where it looped and invented).Tested on the same adapter (dev3,
chat.pywith the same pit.world grounding) on the deposit question and a small-claims question: no invented authorities, attorney referral at the end. The 0.5B model still gets substance wrong at times; the disclaimer stays, and a larger base is the real fix.Registry-only change: the CLI reads w3bs.org/agents.json at runtime.
🤖 Generated with Claude Code