Skip to content

Comments

feat: galileo adk to natively support custom retriever tools#482

Open
savula15 wants to merge 1 commit intomainfrom
adk-retriever-support
Open

feat: galileo adk to natively support custom retriever tools#482
savula15 wants to merge 1 commit intomainfrom
adk-retriever-support

Conversation

@savula15
Copy link
Contributor

@savula15 savula15 commented Feb 19, 2026

User description

Shortcut:
https://app.shortcut.com/galileo/story/55769/galileo-adk-to-support-retriever-tools

Tests:

  • Unit Tests Added
  • E2E Test Added (if it's a user-facing feature, or fixing a bug)

Generated description

Below is a concise technical summary of the changes proposed in this PR:
Introduces native support for custom retriever tools by providing a @galileo_retriever decorator and enhanced detection logic within the GalileoObserver. These changes allow the ADK to distinguish between standard tools and retrievers, enabling RAG-specific quality metrics and improved trace visualization.

TopicDetails
Span & Trace Logic Update SpanManager and TraceBuilder to handle 'retriever' node types and correctly format document outputs for RAG metrics.
Modified files (5)
  • galileo-adk/pyproject.toml
  • galileo-adk/src/galileo_adk/span_manager.py
  • galileo-adk/src/galileo_adk/trace_builder.py
  • galileo-adk/tests/test_span_manager.py
  • galileo-adk/tests/test_trace_builder.py
Latest Contributors(2)
UserCommitDate
ci@rungalileo.iochore-release-galileo-...February 11, 2026
sankar@galileo.aifeat-add-galileo-adk-i...February 10, 2026
Retriever Detection Implement the @galileo_retriever decorator and update GalileoObserver to detect custom and built-in ADK retrieval tools.
Modified files (5)
  • galileo-adk/README.md
  • galileo-adk/src/galileo_adk/__init__.py
  • galileo-adk/src/galileo_adk/decorator.py
  • galileo-adk/src/galileo_adk/observer.py
  • galileo-adk/tests/test_retriever.py
Latest Contributors(2)
UserCommitDate
ci@rungalileo.iochore-release-galileo-...February 11, 2026
sankar@galileo.aifeat-add-galileo-adk-i...February 10, 2026
This pull request is reviewed by Baz. Review like a pro on (Baz).

@savula15 savula15 requested a review from a team as a code owner February 19, 2026 00:05
@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 93.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.55%. Comparing base (d1f987a) to head (1693801).

Files with missing lines Patch % Lines
galileo-adk/src/galileo_adk/observer.py 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #482      +/-   ##
==========================================
+ Coverage   81.85%   82.55%   +0.70%     
==========================================
  Files          96      106      +10     
  Lines        9164    10269    +1105     
==========================================
+ Hits         7501     8478     +977     
- Misses       1663     1791     +128     
Flag Coverage Δ
galileo-adk 88.59% <93.33%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@savula15 savula15 enabled auto-merge (squash) February 19, 2026 00:14
@savula15 savula15 force-pushed the adk-retriever-support branch from 8ec9edd to 50a5891 Compare February 19, 2026 00:34
@savula15 savula15 force-pushed the adk-retriever-support branch from 3937b2b to 1693801 Compare February 21, 2026 03:20
Comment on lines +353 to 357
documents = convert_to_documents(output, "output")
redacted_documents = convert_to_documents(redacted_output, "redacted_output")
return super().add_retriever_span(
id=uuid.uuid4(),
input=input,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TraceBuilder.add_retriever_span repeats the same convert_to_documents + kwargs construction that already lives in GalileoLogger.add_retriever_span (src/galileo/logger/logger.py:1167‑1185), so we now maintain two copies of the retriever-span argument prep. Can we add a helper such as def build_retriever_span_kwargs(input, output, redacted_input=None, redacted_output=None, name=None, duration_ns=None, created_at=None, metadata=None, tags=None, status_code=None, step_number=None) -> dict[str, Any] (maybe in galileo.utils.retrievers), have both callers use it to get documents/redacted_documents + the common dict, and then pass the shared kwargs to their respective super().add_retriever_span + post-processing?

Finding type: Code Dedup and Conventions


  • Apply fix with Baz

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.

2 participants