Using the RAG (Retrieval Augmented Generation) system in TaskingAI to process external data involves the following typical process:
- Creating Collections: Specify the embedding model and storage capacity to create the data collection.
Code Example:
coll = taskingai.retrieval.create_collection(embedding_model_id="...", capacity=1000) - Add Record: Split and process text content into collections
Code Example:
record = taskingai.retrieval.create_record(collection_id=coll.id, content="Artificial Intelligence...", text_splitter={ "type": "token"...}) - Search content: Query relevant data records through API
Code Example:
retrieved = taskingai.retrieval.get_record(collection_id=coll.id, record_id=record.id)
The system supports a variety of text segmentation methods and embedding algorithms, and developers can choose the appropriate parameter configuration according to the data characteristics.The RAG function is especially suitable for AI application scenarios that need to be combined with external knowledge bases, such as intelligent customer service, education Q&A, and so on.
This answer comes from the articleTaskingAI: An Open Source Platform for Developing AI Native ApplicationsThe































