Skip to main content

RAG Service: API Reference

The RAG Service API provides five sets of APIs. Use

EndpointDescriptionRequest200 Response
Indexing API – manipulate the article collection
POST /v1/articles/addAdds articles to the RAG index.List[Article]MessageResponse
POST /v1/articles/removeRemoves articles from the RAG index.List[String]MessageResponse
GET /v1/articles/idsLists IDs of all indexed articles.--ArticleIds
GET /v1/articles/{article-id}Returns an indexed article.--Article
PUT /v1/articles/{article-id}Adds or replaces an article.ArticleMessageResponse
DELETE /v1/articles/{article-id}Removes an article from the RAG index.--MessageResponse
Research API – converse with an AI research assistant
POST /v1/articles/researchInteracts with the research agent.ResearchRequestResearchResponse
POST /v1/articles/research/streamInteracts with the research agent, receiving a stream of responses.ResearchRequest
Recommendation API – search the index for articles
POST /v1/articles/recommendSearch for articles or recommend related articles.RecommendRequestRecommendResponse
Faceting API – get statistics about metadata fields
POST /v1/articles/statsGets statistics for the indexed articles.ArticleStatsRequestArticleStatsResponse
Feedback API – submit user feedback on the quality of the service
POST /v1/articles/recommend/feedbackSubmits feedback for the found/recommended related articles.RecommendFeedbackRequestMessageResponse
POST /v1/articles/research/feedbackSubmits feedback for the research agent response.ResearchFeedbackRequestMessageResponse