Kind: Function
Source: atloria-monorepo/libs/parser-core/src/techdocs/example-grounding.ts
Grounding check for AI-written usage examples: a code example must not call methods that
don't exist on the entity it documents. This catches the classic enrichment hallucination
(e.g. a page for RagChatModelService whose example calls createChatCompletion() — a method
that isn't on the class). Pure + conservative: it only inspects calls on variables PROVABLY
bound to the entity, and no-ops when the entity exposes no method list to ground against.
Signature
tsfunction entityMethodNames(entity: Pick<Entity, 'name'> & Record<string, any>): string[]
Parameters
| Name | Type |
|---|---|
entity | Pick<Entity, 'name'> & Record<string, any> |
Returns: string[]
Was this page helpful?