Reduce GpfDescribeType output - #189
Open
LionelZoubritzky-IGN wants to merge 5 commits into
Open
Conversation
…GetFeatureByIdLayer tools
LionelZoubritzky-IGN
force-pushed
the
split-describe-tool
branch
from
August 17, 2026 12:06
8b09cc1 to
a553fe5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
typename(currently missing because of the OGC API Features specifications).oneOf) when it exists. Only theconstfield is kept.polygon,point-or-multipoint,any, ... extracted from theformatfield of the store schema, removed the "geometry-" prefix). When no geometry or multiple geometries without a "primary-geometry", this field is undefined.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:
const, which is vastly redundant with the name of the property /constand with its description.descriptionof theconstfields. 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.