Skip to content

feat(context-grounding): expose index_id on UnifiedQueryResult#1534

Open
cfauchere wants to merge 4 commits intomainfrom
feat/expose-index-id-on-unified-search
Open

feat(context-grounding): expose index_id on UnifiedQueryResult#1534
cfauchere wants to merge 4 commits intomainfrom
feat/expose-index-id-on-unified-search

Conversation

@cfauchere
Copy link
Copy Markdown

Summary

  • Add index_id field to UnifiedQueryResult
  • Set it from the already-resolved index in both unified_search and unified_search_async

Context

unified_search resolves the index by name (self.retrieve(name)) to get its ID for the API call (/ecs_/v1.2/search/{index_id}), but discards it before returning. Downstream consumers (uipath-langchain-python, uipath-agents-python) need the index ID to write it to the contextGroundingTool trace span for debugging CG issues.

Without index_id in the trace, investigating empty search results requires manual lookup of the index — you can't go from the trace to the CG service logs.

No extra API call — the index is already resolved.

Related PRs

Test plan

  • Verify unified_search result has index_id set
  • Verify unified_search_async result has index_id set
  • Verify index_id appears in contextGroundingTool trace span end-to-end

🤖 Generated with Claude Code

unified_search and unified_search_async already resolve the index by
name to get its ID for the API call, but discard it before returning.
This adds index_id to UnifiedQueryResult and sets it from the resolved
index, so callers can include it in trace spans for debugging.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added the test:uipath-langchain Triggers tests in the uipath-langchain-python repository label Mar 31, 2026
cfauchere pushed a commit to UiPath/uipath-langchain-python that referenced this pull request Mar 31, 2026
Depends on UiPath/uipath-python#1534 which exposes index_id on the result.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cfauchere pushed a commit to UiPath/uipath-langchain-python that referenced this pull request Apr 1, 2026
Depends on UiPath/uipath-python#1534.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Clement Fauchere and others added 3 commits March 31, 2026 20:22
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant