RAG Search: A Detailed Project Overview
RAG Search, developed by thinkany.ai, is an API designed to facilitate search operations by blending the capabilities of retrieval and generative models. This document provides an easy-to-understand introduction to the RAG Search project, covering its setup and use cases.
Quick Start Guide
To get started with the RAG Search API, follow these simple steps:
Step 1: Configuration
Start by creating a .env
file at the project's root directory. This file is crucial for setting up the environment variables required for the API to function. Here are some of the variables you need to define:
SERPER_API_KEY
: Your API key for accessing the search service.OPENAI_BASE_URL
: The base URL for the OpenAI service.OPENAI_API_KEY
: Your API key for OpenAI.OPENAI_MODEL
: The model to be used, such asgpt-3.5-turbo
.OPENAI_EMBED_MODEL
: Model for text embedding, liketext-embedding-ada-002
.ZILLIZ_URI
,ZILLIZ_TOKEN
,ZILLIZ_DIM
,ZILLIZ_COLLECTION
: These are specific to the Zilliz vector database integration.AUTH_API_KEY
: The API key for authenticating requests.
Step 2: Install Dependencies
Ensure you have all necessary libraries and packages by executing the following command in your terminal:
pip install -r requirements.txt
This command will install all Python dependencies listed in the requirements.txt
file.
Step 3: Launch the FastAPI Server
Run the server using FastAPI to expose the API endpoints. Use the following command:
uvicorn main:app --reload --port 8069
This starts the server on port 8069, allowing interaction with the API.
Step 4: Make API Requests
You can test the API with a series of requests. Below is an example of how to interact with it:
@baseUri=http://127.0.0.1:8069
@apiKey=xxx
### ping the server to check connectivity
GET {{baseUri}}/
### perform a rag-search request
POST {{baseUri}}/rag-search
Content-Type: application/json
Authorization: Bearer {{apiKey}}
{
"query": "ThinkAny.AI",
"search_n": 10,
"search_provider": "google",
"is_reranking": true,
"is_detail": true,
"detail_min_score": 0.7,
"detail_top_k": 3,
"is_filter": true,
"filter_min_score": 0.8,
"filter_top_k": 6
}
This example demonstrates how to query the RAG Search API, specifying parameters such as the number of search results required, the search provider, and detailed filtering options based on scoring criteria.
Conclusion
RAG Search API by thinkany.ai offers a robust solution for search operations by leveraging advanced models and custom scoring filters. Their integration provides enhanced search accuracy and relevance, making RAG Search a powerful tool for innovation in various industries. With this guide, users can conveniently set up and begin using the API to fulfill their search needs.