Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 5 Nov 2026. What's built · Install 0.3.0
jadpo
ReferenceErrors

ErrorsAI · rule

query.nearest_type

Nearest-neighbour order measures from something it can't.

Area 21, AI; not declinable; the next step is usually the agent's.

nearest measuring from something it can't: a value of another vector type than the field's, which may come from another model; a field that isn't a vector; an order beside it, which no index serves; or a query whose result isn't List<Nearest<T>>.

example
/// A help article's meaning, as the configured embedding model makes it.type ArticleMeaning = Vector {    dimensions: 1536}/// A customer's question's meaning, as the older model made it.type QuestionMeaning = Vector {    dimensions: 1536}/// An article on the help site, with its meaning once it is embedded.entity HelpArticle {    id: Uuid    body_meaning: ArticleMeaning?}/// The five articles nearest a question.query closest_articles(question_meaning: QuestionMeaning) -> List<Nearest<HelpArticle>> {    from: HelpArticle    order: [HelpArticle.body_meaning nearest question_meaning]    limit: 5}
jadpo checkcheck failed: 1 error, 1 file

error nearest compares HelpArticle.body_meaning with a QuestionMeaning

--> main.jadpo:20:46

   |20 |     order: [HelpArticle.body_meaning nearest question_meaning]   |                                              ^^^^^^^^^^^^^^^^ a `QuestionMeaning`, not an `ArticleMeaning`
reason
A vector type stands for the model that made its vectors and how they are compared, so nearest measures from a vector of the field's own type; a QuestionMeaning may come from another model, and its distance from an ArticleMeaning would mean nothing.
next
Pass an ArticleMeaning, made by the same model (agent)
rule
query.nearest_type
help
https://jadpo.dev/docs/errors/query.nearest_type

Markdown for agents: /docs/errors/query.nearest_type.md.Built from Jadpo main at aee2e8f.