open-telemetry / open-telemetry/opentelemetry-python-genai

Use retrieved doc model from utils across instrumentations and clean up existing code

Open
#743 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39
Forks
64
Avg merge
1d 15h
Merged PRs (30d)
175

Description

There some cleanup todo.. pasting this genai comment here so I don't forget:

Because of that, other retrieval instrumentations written previously pass raw dictionaries:

DSPy: [{"content": str(psg)} for psg in passages]
LlamaIndex: [{"id": node.node_id, "content": node.get_content(), "score": ...}]
LangChain: [{"content": ..., "id": ..., "score": ...}]

Originally posted by @DylanRussell in https://github.com/open-telemetry/opentelemetry-python-genai/pull/723#discussion_r4050479971

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the shared model in utils and the DSPy, LlamaIndex, and LangChain retrieval instrumentations mentioned in the issue. Compare their raw dictionary handling and determine the cleanup scope; done means those instrumentations consistently use the retrieved document model and the existing code is cleaned up.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.