feat: v1 SQL prompt with enriched DataFabric tool description#833
Merged
UIPath-Harshit merged 1 commit intomainfrom May 8, 2026
Merged
Conversation
milind-jain-uipath
approved these changes
May 8, 2026
Contributor
milind-jain-uipath
left a comment
There was a problem hiding this comment.
Approved with a minor comment
…Fabric Introduces a versioned prompt system (v0/v1) for the DataFabric inner sub-graph LLM, cherry-picking high-impact patterns from BIRD v7-hybrid: structured query planning, value resolution via ECP metadata, error taxonomy, and convergence rules. Enriches the outer tool description with actual entity names and descriptions from the agent config so the outer ReAct agent can ground its responses in real data instead of hallucinating generic examples. Also adds SQL normalization (trailing semicolon stripping) and multi-statement validation to the query tool. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
28ffac6 to
d03b7a9
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.
Summary
prompts/v0.py,prompts/v1.py,prompts/registry.py,prompts/context.py): v1 cherry-picks high-impact patterns from BIRD v7-hybrid — structured 10-step query planning, value resolution via ECP metadata, error taxonomy with targeted fixes, and convergence rules to prevent infinite retry loops.query_datafabrictool description now includes actual entity names and descriptions from the agent config, so the outer ReAct agent can ground its "what can I do?" responses in real data instead of hallucinating generic examples like "open orders" or "revenue by region".DataFabricQueryTool.value_resolution_strategy,aggregation_hints,domain_guidance,example_queries) that get overridden at runtime based on ECP metadata presence and resource description.Test plan
test_datafabric_query_tool.pypasses — SQL normalization and validationtest_datafabric_tool.pypasses — tool creation and description enrichmenttest_datafabric_prompt_builder.pypasses — prompt building and formatting🤖 Generated with Claude Code