Markdown for LLMs
LDC-Q4004 — The predicate is not declared by the target package
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-Q4004 — The predicate is not declared by the target package
## What it means
Every predicate named in a question over a package must be declared by
that package: conditions and return values are matched against its
vocabulary. An undeclared name stops the question, and the engine suggests
the declared names that look closest, so a typo is easy to spot.
Use a predicate the target package declares, or check the spelling
against the suggestion in the message.
## Example
```lawql
query q over "demo.diagnostics" { for x: Applicant; where resident(x); select nosuchpred(x); }
```
## Fix
```lawql
from r in rules select r
```
## Engine message
The engine reports this in its own wording:
```text
LDC-Q4004: predicate 'nosuchpred' is not declared by the target package.
```
## Related
- [Questions to the engine](/constructs/queries/) — the shape of a question over a package.
- [LDC-Q4002](/diagnostics/LDC-Q4002/) — when the condition itself is malformed.