The following topics describe how to use the AnalyticDB for PostgreSQL API to quickly build retrieval-augmented generation (RAG) applications.
The RAG architecture uses information retrieval systems to enhance the capabilities of large language models (LLMs) and provides relevant contextual information, such as industry-specific or proprietary data documents. The following figure shows the RAG architecture.
Powered by the self-developed FastANN vector engine, AnalyticDB for PostgreSQL provides a series of document processing capabilities to users by using API operations.
The API encapsulates the following AI Service capabilities:
Multi-tenant management
Document processing: loading, splitting, embedding, and multimode processing
Search capabilities: vector search, full-text search, and reranking
Prerequisites
An Alibaba Cloud account is created. For more information, see Create an Alibaba Cloud account.
The AccessKey pair of your Alibaba Cloud account is created and the AccessKey secret is obtained. For more information, see Obtain an AccessKey pair.