-
Notifications
You must be signed in to change notification settings - Fork 167
Reuse embeddings #666
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
Merged
Merged
Reuse embeddings #666
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
168 changes: 168 additions & 0 deletions
168
docs/modules/ROOT/pages/includes/quarkus-langchain4j-easy-rag.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,168 @@ | ||
|
|
||
| :summaryTableId: quarkus-langchain4j-easy-rag | ||
| [.configuration-legend] | ||
| icon:lock[title=Fixed at build time] Configuration property fixed at build time - All other configuration properties are overridable at runtime | ||
| [.configuration-reference.searchable, cols="80,.^10,.^10"] | ||
| |=== | ||
|
|
||
| h|[[quarkus-langchain4j-easy-rag_configuration]]link:#quarkus-langchain4j-easy-rag_configuration[Configuration property] | ||
|
|
||
| h|Type | ||
| h|Default | ||
|
|
||
| a| [[quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-path]]`link:#quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-path[quarkus.langchain4j.easy-rag.path]` | ||
|
|
||
|
|
||
| [.description] | ||
| -- | ||
| Path to the directory containing the documents to be ingested. | ||
|
|
||
| ifdef::add-copy-button-to-env-var[] | ||
| Environment variable: env_var_with_copy_button:+++QUARKUS_LANGCHAIN4J_EASY_RAG_PATH+++[] | ||
| endif::add-copy-button-to-env-var[] | ||
| ifndef::add-copy-button-to-env-var[] | ||
| Environment variable: `+++QUARKUS_LANGCHAIN4J_EASY_RAG_PATH+++` | ||
| endif::add-copy-button-to-env-var[] | ||
| --|string | ||
| |required icon:exclamation-circle[title=Configuration property is required] | ||
|
|
||
|
|
||
| a| [[quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-path-matcher]]`link:#quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-path-matcher[quarkus.langchain4j.easy-rag.path-matcher]` | ||
|
|
||
|
|
||
| [.description] | ||
| -- | ||
| Matcher used for filtering which files from the directory should be ingested. This uses the `java.nio.file.FileSystem` path matcher syntax. Example: `glob:++**++.txt` to recursively match all files with the `.txt` extension. The default is `glob:++**++`, recursively matching all files. | ||
|
|
||
| ifdef::add-copy-button-to-env-var[] | ||
| Environment variable: env_var_with_copy_button:+++QUARKUS_LANGCHAIN4J_EASY_RAG_PATH_MATCHER+++[] | ||
| endif::add-copy-button-to-env-var[] | ||
| ifndef::add-copy-button-to-env-var[] | ||
| Environment variable: `+++QUARKUS_LANGCHAIN4J_EASY_RAG_PATH_MATCHER+++` | ||
| endif::add-copy-button-to-env-var[] | ||
| --|string | ||
| |`glob:**` | ||
|
|
||
|
|
||
| a| [[quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-recursive]]`link:#quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-recursive[quarkus.langchain4j.easy-rag.recursive]` | ||
|
|
||
|
|
||
| [.description] | ||
| -- | ||
| Whether to recursively ingest documents from subdirectories. | ||
|
|
||
| ifdef::add-copy-button-to-env-var[] | ||
| Environment variable: env_var_with_copy_button:+++QUARKUS_LANGCHAIN4J_EASY_RAG_RECURSIVE+++[] | ||
| endif::add-copy-button-to-env-var[] | ||
| ifndef::add-copy-button-to-env-var[] | ||
| Environment variable: `+++QUARKUS_LANGCHAIN4J_EASY_RAG_RECURSIVE+++` | ||
| endif::add-copy-button-to-env-var[] | ||
| --|boolean | ||
| |`true` | ||
|
|
||
|
|
||
| a| [[quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-max-segment-size]]`link:#quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-max-segment-size[quarkus.langchain4j.easy-rag.max-segment-size]` | ||
|
|
||
|
|
||
| [.description] | ||
| -- | ||
| Maximum segment size when splitting documents, in tokens. | ||
|
|
||
| ifdef::add-copy-button-to-env-var[] | ||
| Environment variable: env_var_with_copy_button:+++QUARKUS_LANGCHAIN4J_EASY_RAG_MAX_SEGMENT_SIZE+++[] | ||
| endif::add-copy-button-to-env-var[] | ||
| ifndef::add-copy-button-to-env-var[] | ||
| Environment variable: `+++QUARKUS_LANGCHAIN4J_EASY_RAG_MAX_SEGMENT_SIZE+++` | ||
| endif::add-copy-button-to-env-var[] | ||
| --|int | ||
| |`300` | ||
|
|
||
|
|
||
| a| [[quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-max-overlap-size]]`link:#quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-max-overlap-size[quarkus.langchain4j.easy-rag.max-overlap-size]` | ||
|
|
||
|
|
||
| [.description] | ||
| -- | ||
| Maximum overlap (in tokens) when splitting documents. | ||
|
|
||
| ifdef::add-copy-button-to-env-var[] | ||
| Environment variable: env_var_with_copy_button:+++QUARKUS_LANGCHAIN4J_EASY_RAG_MAX_OVERLAP_SIZE+++[] | ||
| endif::add-copy-button-to-env-var[] | ||
| ifndef::add-copy-button-to-env-var[] | ||
| Environment variable: `+++QUARKUS_LANGCHAIN4J_EASY_RAG_MAX_OVERLAP_SIZE+++` | ||
| endif::add-copy-button-to-env-var[] | ||
| --|int | ||
| |`30` | ||
|
|
||
|
|
||
| a| [[quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-max-results]]`link:#quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-max-results[quarkus.langchain4j.easy-rag.max-results]` | ||
|
|
||
|
|
||
| [.description] | ||
| -- | ||
| Maximum number of results to return when querying the retrieval augmentor. | ||
|
|
||
| ifdef::add-copy-button-to-env-var[] | ||
| Environment variable: env_var_with_copy_button:+++QUARKUS_LANGCHAIN4J_EASY_RAG_MAX_RESULTS+++[] | ||
| endif::add-copy-button-to-env-var[] | ||
| ifndef::add-copy-button-to-env-var[] | ||
| Environment variable: `+++QUARKUS_LANGCHAIN4J_EASY_RAG_MAX_RESULTS+++` | ||
| endif::add-copy-button-to-env-var[] | ||
| --|int | ||
| |`5` | ||
|
|
||
|
|
||
| a| [[quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-ingestion-strategy]]`link:#quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-ingestion-strategy[quarkus.langchain4j.easy-rag.ingestion-strategy]` | ||
|
|
||
|
|
||
| [.description] | ||
| -- | ||
| The strategy to decide whether document ingestion into the store should happen at startup or not. The default is ON. Changing to OFF generally only makes sense if running against a persistent embedding store that was already populated. | ||
|
|
||
| ifdef::add-copy-button-to-env-var[] | ||
| Environment variable: env_var_with_copy_button:+++QUARKUS_LANGCHAIN4J_EASY_RAG_INGESTION_STRATEGY+++[] | ||
| endif::add-copy-button-to-env-var[] | ||
| ifndef::add-copy-button-to-env-var[] | ||
| Environment variable: `+++QUARKUS_LANGCHAIN4J_EASY_RAG_INGESTION_STRATEGY+++` | ||
| endif::add-copy-button-to-env-var[] | ||
| -- a| | ||
| `on`, `off` | ||
| |`on` | ||
|
|
||
|
|
||
| a| [[quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-reuse-embeddings-enabled]]`link:#quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-reuse-embeddings-enabled[quarkus.langchain4j.easy-rag.reuse-embeddings.enabled]` | ||
|
|
||
|
|
||
| [.description] | ||
| -- | ||
| Whether or not to reuse embeddings. Defaults to `false`. | ||
|
|
||
| ifdef::add-copy-button-to-env-var[] | ||
| Environment variable: env_var_with_copy_button:+++QUARKUS_LANGCHAIN4J_EASY_RAG_REUSE_EMBEDDINGS_ENABLED+++[] | ||
| endif::add-copy-button-to-env-var[] | ||
| ifndef::add-copy-button-to-env-var[] | ||
| Environment variable: `+++QUARKUS_LANGCHAIN4J_EASY_RAG_REUSE_EMBEDDINGS_ENABLED+++` | ||
| endif::add-copy-button-to-env-var[] | ||
| --|boolean | ||
| |`false` | ||
|
|
||
|
|
||
| a| [[quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-reuse-embeddings-file]]`link:#quarkus-langchain4j-easy-rag_quarkus-langchain4j-easy-rag-reuse-embeddings-file[quarkus.langchain4j.easy-rag.reuse-embeddings.file]` | ||
|
|
||
|
|
||
| [.description] | ||
| -- | ||
| The file path to load/save embeddings, assuming `quarkus.langchain4j.easy-rag.reuse-embeddings.enabled == true`. | ||
|
|
||
| Defaults to `easy-rag-embeddings.json` in the current directory. | ||
|
|
||
| ifdef::add-copy-button-to-env-var[] | ||
| Environment variable: env_var_with_copy_button:+++QUARKUS_LANGCHAIN4J_EASY_RAG_REUSE_EMBEDDINGS_FILE+++[] | ||
| endif::add-copy-button-to-env-var[] | ||
| ifndef::add-copy-button-to-env-var[] | ||
| Environment variable: `+++QUARKUS_LANGCHAIN4J_EASY_RAG_REUSE_EMBEDDINGS_FILE+++` | ||
| endif::add-copy-button-to-env-var[] | ||
| --|string | ||
| |`easy-rag-embeddings.json` | ||
|
|
||
| |=== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.