Skip to content

Add clausefinder_3gpp example: clause-cited 3GPP spec Q&A with an abstention gate - #33

Open
chinthave657 wants to merge 1 commit into
NVIDIA:mainfrom
chinthave657:add-clausefinder-3gpp-example
Open

Add clausefinder_3gpp example: clause-cited 3GPP spec Q&A with an abstention gate#33
chinthave657 wants to merge 1 commit into
NVIDIA:mainfrom
chinthave657:add-clausefinder-3gpp-example

Conversation

@chinthave657

Copy link
Copy Markdown

Description

A telecom-domain RAG example over the public GSMA/3GPP corpus, demonstrating two patterns not covered by existing examples:

  1. Clause-aware domain chunking — specs are chunked at clause-heading boundaries with breadcrumb trails, so every retrieved passage carries a citable reference like [TS 38.331 §5.3.5.3], and the agent cites clauses in its answers.
  2. Calibrated abstention— below a cosine relevance floor the retrieval tool returns an explicit ABSTAIN and the agent tells the user the indexed specs don't cover the question, rather than answering from prior knowledge. The default threshold is calibrated against the built index (in-corpus questions score ≥0.50, out-of-domain ≤0.36).

All-NVIDIA endpoints: nvidia/nemotron-3-nano-30b-a3b (agent, native tool calling) + nvidia/nemotron-3-embed-1b (embeddings) via build.nvidia.com — no local GPU. No spec text ships in the repo; users download the corpus themselves from the public GSMA dataset.

Distilled from my larger open-source project ClauseFinder (hybrid retrieval + deterministic citation validation + NeMo Guardrails on the same corpus).

Testing

  • Offline pytest suite (7 tests): chunker (incl. letter-suffixed clauses like 5.3.5.13b), breadcrumbs, index round-trip + corruption detection, cosine search, citation formatting, abstention message.
  • End-to-end with nat run against nvidia-nat 1.8: in-corpus question returns a clause-cited answer; out-of-corpus question ("Bluetooth Class 1 power") abstains. Real outputs are in the example README.
  • ruff + yapf clean against the repo config; SPDX headers on all files.

@chinthave657
chinthave657 requested a review from a team as a code owner August 27, 2026 16:32
@copy-pr-bot

copy-pr-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

…tention gate

A telecom-domain RAG example over the public GSMA/3GPP corpus: clause-aware
chunking (retrieved text carries citable references like [TS 38.331 §5.3.5.3]),
a calibrated cosine abstention gate so the agent refuses out-of-corpus
questions instead of answering from prior knowledge, and all-NVIDIA endpoints
(nemotron-3-nano-30b-a3b agent, nemotron-3-embed-1b embeddings) with native
tool calling. Includes an offline pytest suite for the chunker, index
round-trip, search, and abstention formatting; both the cited-answer and
abstain paths verified end-to-end with nat run against nvidia-nat 1.8.

Signed-off-by: Venkat Chintha <chinthave657@users.noreply.github.com>
@chinthave657
chinthave657 force-pushed the add-clausefinder-3gpp-example branch from 0bdf2ab to dc6c7c2 Compare August 27, 2026 16:34
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