Build a Retrieval-Augmented Generation (RAG) system with RisingWave that answers questions based on the documentation.
OPENAI_API_KEY
environment variable below.
cosine_similarity
UDF.
document_embeddings
materialized view to answer questions.
The following SQL uses the text_embedding
UDF to embed the question, and then finds the top 10 most similar documents from the document_embeddings
materialized view.