feat: new Vectara RAG Component (#2733)

* First implementation of LangWatch tracer

* Remove dependency from backend base internal and add langwatch docs

* Bump langwatch to v0.1.4

* Fix missing log parameter on method

* Move docs to the right folder

* chore: update lock

* Add Vectara RAG component and docs

* [autofix.ci] apply automated fixes

* refactor: update VectaraRAG component to the new component standard

* fix: update VectaraRagComponent filter parameter

Update the filter parameter in the VectaraRagComponent class to use the correct variable name 'self.filter' instead of 'filter'. This ensures that the correct filter value is passed to the VectaraQueryConfig object.

* fix: add condition to set_cache_coro in Graph class

Add a condition to the `set_cache_coro` function call in the `Graph` class. The condition checks if the `cache` variable is true and the `flow_id` is not empty before calling the function. This ensures that the cache is set only when both conditions are met, improving the efficiency of the code.

---------

Co-authored-by: Rogério Chaves <rogeriochaves@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
David Oplatka 2024-07-28 07:02:23 -07:00 committed by GitHub
commit 469625c0a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 222 additions and 17 deletions

View file

@ -0,0 +1,31 @@
---
title: RAG
sidebar_position: 9
slug: /components-rag
---
RAG (Retrieval-Augmented Generation) components process a user query by retrieving relevant documents and generating a concise summary that addresses the user's question.
### Vectara
`Vectara` performs RAG using a Vectara corpus, including document retrieval, reranking results, and summary generation.
**Parameters:**
- **Vectara Customer ID:** Customer ID.
- **Vectara Corpus ID:** Corpus ID.
- **Vectara API Key:** API key.
- **Search Query:** User query.
- **Lexical Interpolation:** How much to weigh lexical vs. embedding scores.
- **Metadata Filters:** Filters to narrow down the search documents and parts.
- **Reranker Type:** How to rerank the retrieved results.
- **Number of Results to Rerank:** Maximum reranked results.
- **Diversity Bias:** How much to diversify retrieved results (only for MMR reranker).
- **Max Results to Summarize:** Maximum search results to provide to summarizer.
- **Response Language:** The language code (use ISO 639-1 or 639-3 codes) of the summary.
- **Prompt Name:** The summarizer prompt.
For more information, consult the [Vectara documentation](https://docs.vectara.com/docs)