looker-open-source / looker-explore-assistant

A React Application for interacting with Looker data through natural language.
MIT License
83 stars 52 forks source link

Gemini Pro returning sql or malformed looker url #52

Closed pjabl closed 1 month ago

pjabl commented 2 months ago

explore-assistant-extension bug The current instructions from src\hooks\useSendVertexMessage.ts , generateExploreUrl function, seem not to be enough :

Instructions:
          - choose only the fields in the below lookml metadata
          - prioritize the field description, label, tags, and name for what field(s) to use for a given description
          - generate only one answer, no more.
          - use the Examples for guidance on how to structure the Looker url query
          - never respond with sql, always return an looker explore url as a single string

many time I keep getting sql or malformed looker url, example:

fields=order.total_product_amount,product.group_0_name
f[order.placed_date]=3 months
sorts=order.total_product_amount desc 0
limit=500
column_limit=50
vis={"type":"looker_bar"}

instead of

fields=order.total_product_amount,product.group_0_name&f[order.placed_date]=3 months&sorts=order.total_product_amount desc 0&limit=500&column_limit=50&vis={"type":"looker_bar"}
LukaFontanilla commented 1 month ago

Resolved here -> https://github.com/looker-open-source/looker-explore-assistant/pull/53/files