NVIDIA-NeMo / NVIDIA-NeMo/Guardrails
backlog: follow up on search provider config
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 842
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 25
Description
- It feels a bit wrong for an object to mutate its data object passed in during initialization. I'd prefer to handle this at the Pydantic validation stage.
- Some embedding models (Gemini) have a
dimensionalityvalue inembedding_parameterswhich we'd need to add to item hash. Without this if a users changes the dimensionality we won't invalidate the cache and cause errors.
Originally posted by @tgasser-nv in https://github.com/NVIDIA-NeMo/Guardrails/pull/1753#pullrequestreview-4052578064
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
Review PR #1753 and trace the search provider configuration and Pydantic validation paths. Check how embedding_parameters contribute to the item hash and cache invalidation, including the dimensionality value described in the issue. Done means initialization no longer mutates the passed data object and dimensionality changes invalidate cached items.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, search
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100