Skip to content

Reduce GpfDescribeType output - #189

Open
LionelZoubritzky-IGN wants to merge 5 commits into
142-gpfschemastore0.2.0from
split-describe-tool
Open

Reduce GpfDescribeType output#189
LionelZoubritzky-IGN wants to merge 5 commits into
142-gpfschemastore0.2.0from
split-describe-tool

Conversation

@LionelZoubritzky-IGN

@LionelZoubritzky-IGN LionelZoubritzky-IGN commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Since #142, the output of GpfDescribeType is very lengthy. In practice, the LLM reads the output of GpfDescribeType into a file, then greps it for the terms it is looking for... so, the full schema seems to be a bit too much for it to handle.

This PR is a compromise: we provide a summarized schema, with only:

  • the typename (currently missing because of the OGC API Features specifications).
  • the full description of the type.
  • the list of non-geometric properties, themselves summarized to only keep:
    • their name,
    • their description,
    • their list of values (oneOf) when it exists. Only the const field is kept.
  • the unique geometry kind (polygon, point-or-multipoint, any, ... extracted from the format field of the store schema, removed the "geometry-" prefix). When no geometry or multiple geometries without a "primary-geometry", this field is undefined.
  • the list of required non-geometric properties.
  • the "x-ign-selectionCriteria" field when present in the upstream schema.

Note that this is rather close to what we had pre-#142, but the URL is a nice bonus because now the LLM can fetch more info if need be. In the end, what's missing from the returned output and only present in the schema is:

  • the "x-ign-representedFeatures" fields, which are usually redundant with the name and descriptions of the fields;
  • the title of the properties and of their const, which is vastly redundant with the name of the property / const and with its description.
  • the description of the const fields. Those may be relevant in some contexts, but I haven't seen it used in my tests so far.

I initially intended to provide a second tool (GpfDescribeType added in 4f19dd2 and removed in 4ee187b) but I observed during testing that this tool was never called, even when querying something as niche as "Fonds de taille" or "Darce", which never appears in the output of GpfDescribeTool. GpfSearchTypes is actually enough to orient the LLM towards the right type, and GpfDescribeType is basically only here to provide the name of the properties and to give precisions on what is described by what, to prevent the LLM from hallucinating answers. So, the LLM never really needs the additional data provided by GpfDescribeTypelDetails; and if it ever does, it can still fetch the full schema by URL.

@LionelZoubritzky-IGN LionelZoubritzky-IGN changed the title Reduce GpfDescribeTool output Reduce GpfDescribeType output Aug 21, 2026
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