Skip to content

Commit 2dad482

Browse files
committed
refactor(docs): improve Berock embedding and RAG documentation
- Replace model-specific enabled properties with unified spring.ai.model.embedding property - Update documentation for Bedrock Cohere and Titan embedding models - Add missing dependency information for RAG advisors in documentation Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
1 parent 853d478 commit 2dad482

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/embeddings/bedrock-cohere-embedding.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ TIP: Refer to the xref:getting-started.adoc#dependency-management[Dependency Man
4848
=== Enable Cohere Embedding Support
4949

5050
By default the Cohere model is disabled.
51-
To enable it set the `spring.ai.bedrock.cohere.embedding.enabled` property to `true`.
51+
To enable it set the `spring.ai.model.embedding` property to `bedrock-cohere`.
5252
Exporting environment variable is one way to set this configuration property:
5353

5454
[source,shell]
5555
----
56-
export SPRING_AI_BEDROCK_COHERE_EMBEDDING_ENABLED=true
56+
export SPRING_AI_MODEL_EMBEDDING=bedrock-cohere
5757
----
5858

5959
=== Embedding Properties
@@ -85,8 +85,8 @@ The prefix `spring.ai.bedrock.cohere.embedding` (defined in `BedrockCohereEmbedd
8585
[cols="3,4,1", stripes=even]
8686
|====
8787
| Property | Description | Default
88-
| spring.ai.bedrock.cohere.embedding.enabled (Removed and no longer valid) | Enable or disable support for Cohere | false
8988
| spring.ai.model.embedding | Enable or disable support for Cohere | bedrock-cohere
89+
| spring.ai.bedrock.cohere.embedding.enabled (Removed and no longer valid) | Enable or disable support for Cohere | false
9090
| spring.ai.bedrock.cohere.embedding.model | The model id to use. See the https://github.com/spring-projects/spring-ai/blob/056b95a00efa5b014a1f488329fbd07a46c02378/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/api/CohereEmbeddingBedrockApi.java#L150[CohereEmbeddingModel] for the supported models. | cohere.embed-multilingual-v3
9191
| spring.ai.bedrock.cohere.embedding.options.input-type | Prepends special tokens to differentiate each type from one another. You should not mix different types together, except when mixing types for search and retrieval. In this case, embed your corpus with the search_document type and embedded queries with type search_query type. | SEARCH_DOCUMENT
9292
| spring.ai.bedrock.cohere.embedding.options.truncate | Specifies how the API handles inputs longer than the maximum token length. If you specify LEFT or RIGHT, the model discards the input until the remaining input is exactly the maximum input token length for the model. | NONE
@@ -130,7 +130,7 @@ spring.ai.bedrock.aws.region=eu-central-1
130130
spring.ai.bedrock.aws.access-key=${AWS_ACCESS_KEY_ID}
131131
spring.ai.bedrock.aws.secret-key=${AWS_SECRET_ACCESS_KEY}
132132
133-
spring.ai.bedrock.cohere.embedding.enabled=true
133+
spring.ai.model.embedding=bedrock-cohere
134134
spring.ai.bedrock.cohere.embedding.options.input-type=search-document
135135
----
136136

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/embeddings/bedrock-titan-embedding.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ TIP: Refer to the xref:getting-started.adoc#dependency-management[Dependency Man
5555
=== Enable Titan Embedding Support
5656

5757
By default the Titan embedding model is disabled.
58-
To enable it set the `spring.ai.bedrock.titan.embedding.enabled` property to `true`.
58+
To enable it set the `spring.ai.model.embedding` property to `bedrock-titan`.
5959
Exporting environment variable is one way to set this configuration property:
6060

6161
[source,shell]
6262
----
63-
export SPRING_AI_BEDROCK_TITAN_EMBEDDING_ENABLED=true
63+
export SPRING_AI_MODEL_EMBEDDING=bedrock-titan
6464
----
6565

6666
=== Embedding Properties
@@ -129,7 +129,7 @@ spring.ai.bedrock.aws.region=eu-central-1
129129
spring.ai.bedrock.aws.access-key=${AWS_ACCESS_KEY_ID}
130130
spring.ai.bedrock.aws.secret-key=${AWS_SECRET_ACCESS_KEY}
131131
132-
spring.ai.bedrock.titan.embedding.enabled=true
132+
spring.ai.model.embedding=bedrock-titan
133133
----
134134

135135
TIP: replace the `regions`, `access-key` and `secret-key` with your AWS credentials.

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/retrieval-augmented-generation.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ NOTE: Learn more about Retrieval Augmented Generation in the xref:concepts.adoc#
1313

1414
Spring AI provides out-of-the-box support for common RAG flows using the `Advisor` API.
1515

16+
To use the `QuestionAnswerAdvisor` or `RetrievalAugmentationAdvisor`, you need to add the `spring-ai-advisors-vector-store` dependency to your project:
17+
18+
[source,xml]
19+
----
20+
<dependency>
21+
<groupId>org.springframework.ai</groupId>
22+
<artifactId>spring-ai-advisors-vector-store</artifactId>
23+
</dependency>
24+
----
25+
1626
=== QuestionAnswerAdvisor
1727

1828
A vector database stores data that the AI model is unaware of.

0 commit comments

Comments
 (0)