Skip to content

Support one doc to many prompts? #472

@Dig-Doug

Description

@Dig-Doug

Is there a way to send multiple LLM requests for a given document? For example, say I have an earlier pipeline step that identifies individual spans that should be labelled by a LLM.

Looking at the API:

def generate_prompts(self, docs: Iterable[Doc]) -> Iterable[str]:
    ...

def parse_responses(self, docs: Iterable[Doc], responses: Iterable[str]) -> Iterable[Doc]:
    ...

It could maybe be:

def generate_prompts(self, docs: Iterable[Doc]) -> Iterable[(Doc, Prompt, UserContext)]:
   ...

def parse_responses(self, responses: Iterable[(Doc, Prompt, UserContext, Response)]):
  ...

To allow the user to produce multiple prompts and attach metadata for identification later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions