open-telemetry / open-telemetry/opentelemetry-python-genai
Use retrieved doc model from utils across instrumentations and clean up existing code
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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