# 数据检索

## Afarensis GPT 操作数据检索指南

在GPT中，操作可以执行的最常见任务之一是数据检索。操作可能需要访问API以根据关键字搜索检索数据，访问关系数据库以基于结构化查询检索记录，或者访问向量数据库以基于语义搜索检索文本块。

### 使用API检索数据

许多组织依靠第三方软件来存储重要数据。这些提供程序通常提供REST API，使外部系统能够搜索和检索信息。在构建与提供程序的REST API集成的操作时，您需要确认检索方法、身份验证方案以及OpenAPI规范。

### 使用关系数据库检索数据

组织使用关系数据库来存储与其业务相关的各种记录。这些记录可以包含有用的上下文，这将有助于改进 GPT 的响应。在构建与关系数据库集成的操作时，需要考虑到REST API的可用性、公共互联网的可访问性、复杂查询字符串以及数据库权限。

### 使用矢量数据库检索数据

如果你想为你的 GPT 配备最相关的搜索结果，你可以考虑将你的 GPT 与支持语义搜索的向量数据库集成。在构建与矢量数据库集成的操作时，需要考虑到REST API的可用性、公共互联网的可访问性、查询嵌入以及数据库权限。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.afarensis.com/xing-dong/shu-ju-jian-suo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
