Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to do RAG with Q&A Model when there is more than one input is needed to RAG processor? #10

Open
ramda1234786 opened this issue Jan 15, 2024 · 0 comments

Comments

@ramda1234786
Copy link

Hi All,

I am using Q&A model for RAG
The Q&A Model takes two inputs as question and context

{
		"question": "where live??",
		"context": "My name is Clara and I live in Madrid."
}

While doing neural search how i will pass the parameter for question and context
Where should i add the context? Or utilizing two paramters is not possible in OpenSearch RAG?

{
    "query": {
        "neural": {
            "neural_field_vector": {
                "query_text": {{question}},
                "model_id": "90tQBI0BCjm4TK7_mz2B",
                "k": 1
            }
        }
    },
    "size": 1,
	"_source": [ "neural_field"],
    "ext": {
        "generative_qa_parameters": {
            "llm_model": "bedrock/q&a model",
            "llm_question": {{question}},
            "conversation_id": "eHFSxIwBu3N8jyGnExM0",
            "context_size": 5,
            "interaction_size": 2,
            "timeout": 15        }
    }
}

Any example for Q&A models as we have only parameter like llm_question?

While creating connector, i am giving the request body as

"request_body": "{ \"question\": \"${parameters.question}\" , \"context\": \"${parameters.context}\"}"

image

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

No branches or pull requests

1 participant