Skip to content
Discussion options

You must be logged in to vote

Here is the recommended approach for configuring a RAG pipeline with Spring AI Alibaba:

1. Add Dependencies

<dependency>
    <groupId>com.alibaba.cloud.ai</groupId>
    <artifactId>spring-ai-alibaba-starter</artifactId>
</dependency>

2. Configure Application Properties

spring:
  ai:
    dashscope:
      api-key: ${DASHSCOPE_API_KEY}
    vectorstore:
      elasticsearch:
        uris: ${ES_URIS}

3. Build RAG Pipeline

@Bean
public ChatClient chatClient(ChatClient.Builder builder,
                               VectorStore vectorStore) {
    return builder
        .defaultAdvisors(new QuestionAnswerAdvisor(vectorStore))
        .build();
}

4. Best Practices

  • Use async document ingestion for …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by however-yir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant