Skip to main content
Glama

groundlens_sgi

Read-onlyIdempotent

Verify that an LLM response engaged with the provided source document using the Semantic Grounding Index score. Ideal for auditing RAG pipeline provenance.

Instructions

Check whether an LLM response engaged a source document (SGI). Provenance, not truth.

SGI (Semantic Grounding Index) measures whether the response engaged with the provided context or stayed anchored to the question. This is the method to use for RAG pipeline verification — did the model actually use the retrieved documents?

The score is a ratio: dist(response, question) / dist(response, context). A high ratio means the response moved toward the context. A low ratio means it stayed near the question (possibly ignored the context).

IMPORTANT: this measures PROVENANCE. An answer that borrows the source's vocabulary and structure but changes one figure will pass. Surface the handoff field and escalate fact-level verification to a second stage.

Args: params (SGIInput): The question, source context, and LLM response.

Returns: str: JSON with a plain-language CHECK, the SGI score, and the two distances.

Examples: - Verifying a RAG chatbot used the retrieved documents - Checking if a summary is faithful to the source text - Auditing whether context was ignored in a customer support bot

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description goes beyond annotations by disclosing a critical behavioral trait: the tool measures provenance and can pass answers that borrow vocabulary but change facts. It advises surfacing the 'handoff' field and escalating fact checks, adding valuable context beyond the readOnlyHint, idempotentHint, and destructiveHint annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear purpose statement upfront, followed by explanation of SGI, usage importance, and examples. It is slightly verbose (e.g., the ratio formula could be concise), but overall efficient and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (3 inputs, clear output schema present), the description fully covers its purpose, usage, return value (JSON with CHECK, score, distances), and example use cases. No gaps are evident.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides detailed descriptions for all three parameters (question, context, response). The description repeats this info with minimal added value ('Args: params (SGIInput): ...'), so it does not significantly enhance parameter understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool checks whether an LLM response engaged a source document, with emphasis on provenance. However, it does not explicitly distinguish from sibling tools (groundlens_check, groundlens_dgi), though it implies a unique use case for RAG pipeline verification.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear guidance on when to use this tool ('for RAG pipeline verification') and hints at when not to (escalate fact-level verification elsewhere). However, it does not explicitly name alternative tools, missing an opportunity to differentiate from siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/groundlens-dev/groundlens-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server