You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -71,6 +72,7 @@ By default `OpenAI` is used by the evaluation. If you want to use the same LLM-c
71
72
Endpoint to remove documents from the vector database.
72
73
73
74
#### `/information_pieces/upload`
75
+
74
76
Endpoint to upload documents into the vector database. These documents need to have been parsed. For simplicity, a LangChain Documents like format is used.
75
77
Uploaded documents are required to contain the following metadata:
76
78
@@ -94,7 +96,7 @@ Uploaded documents are required to contain the following metadata:
94
96
| chat_graph |[`rag_core_api.graph.graph_base.GraphBase`](./rag-core-api/src/rag_core_api/graph/graph_base.py)|[`rag_core_api.impl.graph.chat_graph.DefaultChatGraph`](./rag-core-api/src/rag_core_api/impl/graph/chat_graph.py)| Langgraph graph that contains the entire logic for question answering. |
95
97
| traced_chat_graph |[`rag_core_lib.chains.async_chain.AsyncChain[Any, Any]`](./rag-core-lib/src/rag_core_lib/chains/async_chain.py)|[`rag_core_lib.impl.tracers.langfuse_traced_chain.LangfuseTracedGraph`](./rag-core-lib/src/rag_core_lib/impl/tracers/langfuse_traced_chain.py)| Wraps around the *chat_graph* and add langfuse tracing. |
96
98
| evaluator |[`rag_core_api.impl.evaluator.langfuse_ragas_evaluator.LangfuseRagasEvaluator`](./rag-core-api/src/rag_core_api/impl/evaluator/langfuse_ragas_evaluator.py)|[`rag_core_api.impl.evaluator.langfuse_ragas_evaluator.LangfuseRagasEvaluator`](./rag-core-api/src/rag_core_api/impl/evaluator/langfuse_ragas_evaluator.py)| The evaulator used in the evaluate endpoint. |
97
-
| chat_endpoint |[`rag_core_api.api_endpoints.chat.Chat`](./rag-core-api/src/rag_core_api/api_endpoints/chat.py)|[`rag_core_api.impl.api_endpoints.default_chat.DefaultChat`](./rag-core-api/src/rag_core_api/impl/api_endpoints/default_chat.py)| Implementation of the chat endpoint. Default implementation just calls the *traced_chat_graph*|
99
+
| chat_endpoint |[`rag_core_api.api_endpoints.chat.Chat`](./rag-core-api/src/rag_core_api/api_endpoints/chat.py)|[`rag_core_api.impl.api_endpoints.default_chat.DefaultChat`](./rag-core-api/src/rag_core_api/impl/api_endpoints/default_chat.py)| Implementation of the chat endpoint. Default implementation just calls the *traced_chat_graph*|
98
100
| ragas_llm |`langchain_core.language_models.chat_models.BaseChatModel`|`langchain_openai.ChatOpenAI` or `langchain_ollama.ChatOllama`| The LLM used for the ragas evaluation. |
99
101
100
102
## 2. Admin API Lib
@@ -115,7 +117,7 @@ The following endpoints are provided by the *admin-api-lib*:
115
117
All required python libraries can be found in the [pyproject.toml](./admin-api-lib/pyproject.toml) file.
116
118
In addition to python libraries, the following system packages are required:
117
119
118
-
```
120
+
```shell
119
121
build-essential
120
122
make
121
123
```
@@ -157,10 +159,10 @@ The extracted information will be summarized using LLM. The summary, as well as
157
159
| key_value_store |[`admin_api_lib.impl.key_db.file_status_key_value_store.FileStatusKeyValueStore`](./admin-api-lib/src/admin_api_lib/impl/key_db/file_status_key_value_store.py)|[`admin_api_lib.impl.key_db.file_status_key_value_store.FileStatusKeyValueStore`](./admin-api-lib/src/admin_api_lib/impl/key_db/file_status_key_value_store.py)| Is used for storing the available sources and their current state. |
158
160
| chunker |[`admin_api_lib.chunker.chunker.Chunker`](./admin-api-lib/src/admin_api_lib/chunker/chunker.py)|[`admin_api_lib.impl.chunker.text_chunker.TextChunker`](./admin-api-lib/src/admin_api_lib/impl/chunker/text_chunker.py)| Used for splitting the documents in managable chunks. |
159
161
| document_extractor |[`admin_api_lib.extractor_api_client.openapi_client.api.extractor_api.ExtractorApi`](./admin-api-lib/src/admin_api_lib/extractor_api_client/openapi_client/api/extractor_api.py)|[`admin_api_lib.extractor_api_client.openapi_client.api.extractor_api.ExtractorApi`](./admin-api-lib/src/admin_api_lib/extractor_api_client/openapi_client/api/extractor_api.py)| Needs to be replaced if adjustments to the `extractor-api` is made. |
160
-
| rag_api |[`admin_api_lib.rag_backend_client.openapi_client.api.rag_api.RagApi`](./admin-api-lib/src/admin_api_lib/rag_backend_client/openapi_client/api/rag_api.py)|[`admin_api_lib.rag_backend_client.openapi_client.api.rag_api.RagApi`](./admin-api-lib/src/admin_api_lib/rag_backend_client/openapi_client/api/rag_api.py)| Needs to be replaced if changes to the `/information_pieces/remove` or `/information_pieces/upload` of the [`rag-core-api`](#rag-core-api) are made. |
162
+
| rag_api |[`admin_api_lib.rag_backend_client.openapi_client.api.rag_api.RagApi`](./admin-api-lib/src/admin_api_lib/rag_backend_client/openapi_client/api/rag_api.py)|[`admin_api_lib.rag_backend_client.openapi_client.api.rag_api.RagApi`](./admin-api-lib/src/admin_api_lib/rag_backend_client/openapi_client/api/rag_api.py)| Needs to be replaced if changes to the `/information_pieces/remove` or `/information_pieces/upload` of the [`rag-core-api`](#1-rag-core-api) are made. |
161
163
| summarizer_prompt |`str`|[`admin_api_lib.prompt_templates.summarize_prompt.SUMMARIZE_PROMPT`](./admin-api-lib/src/admin_api_lib/prompt_templates/summarize_prompt.py)| The prompt used of the summarization. |
162
164
| langfuse_manager |[`rag_core_lib.impl.langfuse_manager.langfuse_manager.LangfuseManager`](./rag-core-lib/src/rag_core_lib/impl/langfuse_manager/langfuse_manager.py)|[`rag_core_lib.impl.langfuse_manager.langfuse_manager.LangfuseManager`](./rag-core-lib/src/rag_core_lib/impl/langfuse_manager/langfuse_manager.py)| Retrieves additional settings, as well as the prompt from langfuse if available. |
163
-
| summarizer |[`admin_api_lib.summarizer.summarizer.Summarizer`](./admin-api-lib/src/admin_api_lib/summarizer/summarizer.py)|[`admin_api_lib.impl.summarizer.langchain_summarizer.LangchainSummarizer`](./admin-api-lib/src/admin_api_lib/impl/summarizer/langchain_summarizer.py)| Creates the summaries. |
165
+
| summarizer |[`admin_api_lib.summarizer.summarizer.Summarizer`](./admin-api-lib/src/admin_api_lib/summarizer/summarizer.py)|[`admin_api_lib.impl.summarizer.langchain_summarizer.LangchainSummarizer`](./admin-api-lib/src/admin_api_lib/impl/summarizer/langchain_summarizer.py)| Creates the summaries. Uses the shared retry decorator with optional per-summarizer overrides (see 2.4). |
164
166
| untraced_information_enhancer |[`admin_api_lib.information_enhancer.information_enhancer.InformationEnhancer`](./admin-api-lib/src/admin_api_lib/information_enhancer/information_enhancer.py)|[`admin_api_lib.impl.information_enhancer.general_enhancer.GeneralEnhancer`](./admin-api-lib/src/admin_api_lib/impl/information_enhancer/general_enhancer.py)| Uses the *summarizer* to enhance the extracted documents. |
165
167
| information_enhancer |[`rag_core_lib.chains.async_chain.AsyncChain[Any, Any]`](./rag-core-lib/src/rag_core_lib/chains/async_chain.py)|[`rag_core_lib.impl.tracers.langfuse_traced_chain.LangfuseTracedGraph`](./rag-core-lib/src/rag_core_lib/impl/tracers/langfuse_traced_chain.py)|Wraps around the *untraced_information_enhancer* and adds langfuse tracing. |
166
168
| document_deleter |[`admin_api_lib.api_endpoints.document_deleter.DocumentDeleter`](./admin-api-lib/src/admin_api_lib/api_endpoints/document_deleter.py)|[`admin_api_lib.impl.api_endpoints.default_document_deleter.DefaultDocumentDeleter`](./admin-api-lib/src/admin_api_lib/impl/api_endpoints/default_document_deleter.py)| Handles deletion of sources. |
@@ -169,6 +171,33 @@ The extracted information will be summarized using LLM. The summary, as well as
169
171
| document_reference_retriever |[`admin_api_lib.api_endpoints.document_reference_retriever.DocumentReferenceRetriever`](./admin-api-lib/src/admin_api_lib/api_endpoints/document_reference_retriever.py)|[`admin_api_lib.impl.api_endpoints.default_document_reference_retriever.DefaultDocumentReferenceRetriever`](./admin-api-lib/src/admin_api_lib/impl/api_endpoints/default_document_reference_retriever.py)| Handles return of files from connected storage. |
170
172
| file_uploader |[`admin_api_lib.api_endpoints.file_uploader.FileUploader`](./admin-api-lib/src/admin_api_lib/api_endpoints/file_uploader.py)|[`admin_api_lib.impl.api_endpoints.default_file_uploader.DefaultFileUploader`](./admin-api-lib/src/admin_api_lib/impl/api_endpoints/default_file_uploader.py)| Handles upload and extraction of files. |
171
173
174
+
### 2.4 Summarizer retry behavior
175
+
176
+
The default summarizer implementation (`LangchainSummarizer`) now uses the shared retry decorator with exponential backoff from the core library.
- Each field in `SummarizerSettings` is optional. When a field is provided (not None), it overrides the corresponding value from `RetryDecoratorSettings`.
185
+
- When a field is not provided (None), the summarizer falls back to the value from `RetryDecoratorSettings`.
186
+
- Zero values (e.g., 0 or 0.0 where allowed) are honored and do not trigger fallback.
187
+
- The effective retry configuration is computed once per summarizer instance at initialization.
188
+
189
+
Configuring via environment variables
190
+
191
+
- Summarizer-specific (prefix `SUMMARIZER_`):
192
+
-`SUMMARIZER_MAX_RETRIES`
193
+
-`SUMMARIZER_RETRY_BASE_DELAY`
194
+
-`SUMMARIZER_RETRY_MAX_DELAY`
195
+
-`SUMMARIZER_BACKOFF_FACTOR`
196
+
-`SUMMARIZER_ATTEMPT_CAP`
197
+
-`SUMMARIZER_JITTER_MIN`
198
+
-`SUMMARIZER_JITTER_MAX`
199
+
- Global fallback (prefix `RETRY_DECORATOR_`): see section [4.2](#42-retry-decorator-exponential-backoff) for all keys and defaults.
200
+
172
201
## 3. Extractor API Lib
173
202
174
203
The Extractor Library contains components that provide document parsing capabilities for various file formats and web sources. It supports extracting content from PDF, DOCX, XML files, as well as web pages via sitemaps and Confluence pages. It also includes a default `dependency_container`, that is pre-configured and is a good starting point for most use-cases. This API should not be exposed by ingress and only used for internally.
@@ -197,6 +226,7 @@ tesseract-ocr-eng
197
226
### 3.2 Endpoints
198
227
199
228
#### `/extract_from_file`
229
+
200
230
This endpoint will extract the information from PDF,PTTX,WORD,XML files.
201
231
It will load the files from the connected storage.
202
232
The following types of information will be extracted:
@@ -215,6 +245,7 @@ The following types of information can be extracted:
215
245
-`IMAGE`: image found in the document
216
246
217
247
For sitemap sources, additional parameters can be provided, e.g.:
248
+
218
249
-`web_path`: The URL of the XML sitemap to crawl
219
250
-`filter_urls`: JSON array of URL patterns to filter pages (optional)
220
251
-`header_template`: JSON object for custom HTTP headers (optional)
0 commit comments