Skip to content

Help needed with Pipeline #8611

Answered by d-kleine
marfago asked this question in Questions
Dec 8, 2024 · 2 comments · 6 replies
Discussion options

You must be logged in to vote

The error says that retriever (which is InMemoryBM25Retriever in your case) does not provide any input for query. But this is mandatory for running your retriever, see here in the table:

Mandatory run variables | "query": A query string

So, you need to change the prompt format in the template to

country = "France"
question = f"What is the official language of {country}?"

template = """
...

Question: {{ question }}
"""

and pass a query string (contained in the question variable for the value) to the "query" key for the retriever in your pipe.run() workflow, for example:

result = pipe.run({
        "retriever": {"query": question}, # added 
        "prompt_builder": {"question": question} 

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by marfago
Comment options

You must be logged in to vote
6 replies
@marfago
Comment options

@d-kleine
Comment options

@marfago
Comment options

@julian-risch
Comment options

@marfago
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants