Legal Dictionary (कानुनी शब्दकोश)
Look up Nepali and English legal terms in the Nepal Law Commission dictionary
The Legal Dictionary is a Baudhik AI tool backed by the Nepal Law Commission dictionary (कानुनी शब्दकोश). It provides bidirectional lookup — Nepali to English and English to Nepali — with full legal definitions.
How it works
When enabled on an agent, the LLM can call legal_dictionary_lookup whenever it is uncertain about the precise legal meaning of a term. Instead of answering from memory, it looks up the term in the dictionary and uses the authoritative definition.
Nepali to English
Given a Devanagari term, the tool returns the English translation and the full Nepali legal definition.
English to Nepali
Given an English word or phrase, the tool returns the Nepali headword and the full Nepali legal definition.
Fuzzy matching
If no exact entry exists, the tool runs a similarity search (difflib, threshold 0.6) and returns the closest matches. The LLM then asks you to confirm which term was meant rather than guessing.
For Nepali input, use the Devanagari script. For English input, use the English word or phrase.
Enabling on an agent
- Go to Admin → Custom Agents → select or create an agent
- In the Tools section, toggle on Legal Dictionary
- Save the agent
REST API
The dictionary is also available as a REST endpoint, independent of chat:
GET /api/dictionary/lookup?q=<term>
Returns the dictionary entry and the lookup direction (nepali-to-english or english-to-nepali). Accessible with basic authentication.
Tool precedence
When the Legal Dictionary is enabled alongside Najir Search, Baudhik AI applies a tool precedence routing system:
- Legal Dictionary — for term definitions and translations
- Internal Search — for statute content and provisions
- Najir Search — for court interpretation and precedents
- Web Search — for information outside the knowledge base
The LLM follows this order automatically. Statute content questions go to internal_search, not the dictionary — the dictionary is for definitions, not provisions.