RAG Service: API Reference
The RAG Service API provides five sets of APIs. Use
- the Indexing API to manage your article collection,
- the Research API to converse with the articles via AI,
- the Recommendation API for both search and discovery, and
- the Faceting API to get statistics about metadata fields,
- the Feedback API to submit user feedback on the quality of the service.
| Endpoint | Description | Request | 200 Response |
|---|---|---|---|
| Indexing API – manipulate the article collection | |||
| POST /v1/articles/add | Adds articles to the RAG index. | List[Article] | MessageResponse |
| POST /v1/articles/remove | Removes articles from the RAG index. | List[String] | MessageResponse |
| GET /v1/articles/ids | Lists 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. | Article | MessageResponse |
| DELETE /v1/articles/{article-id} | Removes an article from the RAG index. | -- | MessageResponse |
| Research API – converse with an AI research assistant | |||
| POST /v1/articles/research | Interacts with the research agent. | ResearchRequest | ResearchResponse |
| POST /v1/articles/research/stream | Interacts with the research agent, receiving a stream of responses. | ResearchRequest | |
| Recommendation API – search the index for articles | |||
| POST /v1/articles/recommend | Search for articles or recommend related articles. | RecommendRequest | RecommendResponse |
| Faceting API – get statistics about metadata fields | |||
| POST /v1/articles/stats | Gets statistics for the indexed articles. | ArticleStatsRequest | ArticleStatsResponse |
| Feedback API – submit user feedback on the quality of the service | |||
| POST /v1/articles/recommend/feedback | Submits feedback for the found/recommended related articles. | RecommendFeedbackRequest | MessageResponse |
| POST /v1/articles/research/feedback | Submits feedback for the research agent response. | ResearchFeedbackRequest | MessageResponse |