Skip to content

[Feature] Optionally return metadata alongside passages via dspy.Retrieve #8678

@BenMcH

Description

@BenMcH

What feature would you like to see?

I would like to see the ability to return metadata alongside a passage when using dspy.Retrieve, in the form of a dict. The reason being is that many enterprise use-cases I have worked on have returned sources for the passages, match scores, etc. A simple metadata key would suffice to allow any and all flexibility in document responses.

Would you like to contribute?

  • Yes, I'd like to help implement this.
  • No, I just want to request it.

Additional Context

This is similar to langchain's document type

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions