elastic / search-ui

Search UI. Libraries for the fast development of modern, engaging search experiences.
https://docs.elastic.co/search-ui
Apache License 2.0
1.92k stars 368 forks source link

Add support for RAG #1080

Open sa- opened 1 month ago

sa- commented 1 month ago

Is your feature request related to a problem? Please describe. RAG (or AI question answering)

Describe the solution you'd like

In the config object the interface could be defined like this

const config = {
  ...,
  retrieval_augmented_generation: {
    "provider_type": "anthropic|openai|huggingface|mistral|cohere|bedrock|etc",
    "base_url": "elastic.co",
    "api_key": "changeme",
    "prompt_template": "The user searched for: {{query}} \n Answer only from this context\n\n{{context}}",
    "num_results_in_context": 20
  },
  ...
}

Describe alternatives you've considered n/a

Additional context Something that looks like this Image