kibana-context-engine
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseQuery Context Engine AI Indices
查询 Context Engine AI Index
<!-- begin-partial: preamble -->
<!-- begin-partial: preamble -->
Environment Configuration
环境配置
This skill executes Elasticsearch operations through the CLI. If the
CLI is not installed, tell the user what it is needed for. Do
not guess credentials, call the HTTP API directly, or attempt other workarounds.
elasticelasticThis skill references operations in HTTP-shorthand form (e.g., , , ,
, ). The Operations table at the end of this document
maps each shorthand to the equivalent CLI command — always use the CLI rather than calling the HTTP API
directly.
<!-- end-partial: preamble -->GET /GET /_cat/indicesGET /{index}/_mappingGET /{index}/_settings/index.modePOST /_queryelastic此 skill 通过 CLI 执行 Elasticsearch 操作。如果尚未安装 CLI,请告知用户安装它是必需的。不要猜测凭据、直接调用 HTTP API,也不要尝试其他变通方案。
elasticelastic此 skill 中的操作采用 HTTP 简写形式(例如,、、、
、)。本文档末尾的操作表将每种简写映射到对应的
CLI 命令——始终使用 CLI,不要直接调用 HTTP API。
<!-- end-partial: preamble -->GET /GET /_cat/indicesGET /{index}/_mappingGET /{index}/_settings/index.modePOST /_queryelasticConcepts
概念
AI Index — an Elasticsearch index named , or a data stream named , registered with
the Context Engine under a logical id. The registration lives in Kibana; the knowledge lives in the backing index. Only
the list operation knows which indices are registered and what to put in ; the index name alone does
not tell you.
ai-index-idx-*ai-index-ds-*ai-index-*FROMKnowledge Indicator (KI) — one document in an AI Index: context prepared for agents, such as a description of some
data, a summary, an access pattern, a runnable query, or a record of a Kibana resource. A KI may answer a question
outright, or help you locate and use the source that does.
A KI is retired by a tombstone () or by an in the past. On a data
stream, one KI is several revisions under the same , the newest of which is its current state. The query API returns
only current, active, unexpired KIs unless the query asks otherwise (see Lifecycle).
governance.lifecycle.status: deletedexpires_atidSearch the AI Indices before broader retrieval whenever their KIs may cover the question. This skill reads KIs;
generating them belongs to the Context Engine's automations and feedback loop.
Three read-only Context Engine HTTP APIs back this skill. The Operations table maps each to its
CLI command:
elastic| Operation | HTTP API (shorthand) | Input | Returns |
|---|---|---|---|
| List | | — | |
| Describe | | | |
| Query | | | |
Use them in this order: list → describe → query. Never guess an index id, a target, or a field name; describe
supplies all three. Nothing else can read an AI Index correctly: a generic ES|QL query () or index listing
neither knows which indices are registered nor applies the space scoping.
FROMPOST /_queryEvery call is scoped to one space, and the space comes from the request rather than from anything written into the
query. Point the request at another space to read that space's KIs.
AI Index — 一种名为 的 Elasticsearch index,或一种名为 的 data stream,
并以 logical id 注册到 Context Engine。注册记录位于 Kibana 中;知识数据位于底层 index 中。只有
list 操作知道哪些 index 已注册,以及 中应填写的值;仅凭 index 名称无法得知。
ai-index-idx-*ai-index-ds-*ai-index-*FROMKnowledge Indicator (KI) — AI Index 中的一份文档:为 Agent 准备的上下文,例如某份数据的描述、
摘要、access pattern、可运行的查询,或一条 Kibana resource 记录。KI 可以直接回答问题,也可以帮助
定位并使用能够回答问题的来源。
当 tombstone 存在,或 已过期时,KI 会被退役。在 data
stream 中,一个 KI 是同一 下的多个 revision,其中最新 revision 代表其当前状态。除非查询另有要求
(参见生命周期),查询 API 只返回当前、有效且未过期的 KI。
governance.lifecycle.status: deletedexpires_atid只要 AI Index 中的 KI 可能覆盖问题,就应先搜索 AI Index,再进行更广泛的检索。此 skill 负责读取 KI;
生成 KI 属于 Context Engine 的 automations 和 feedback loop。
此 skill 底层使用三个只读的 Context Engine HTTP API。操作表将它们映射到对应的 CLI
命令:
elastic| 操作 | HTTP API(简写) | 输入 | 返回值 |
|---|---|---|---|
| List | | — | |
| Describe | | 路径中的 | |
| Query | | | |
按顺序使用它们:list → describe → query。绝不猜测 index id、 target 或 field name;describe
会提供这三项信息。其他任何方式都无法正确读取 AI Index:通用 ES|QL query()或 index
listing 既不知道哪些 index 已注册,也不会应用 space scoping。
FROMPOST /_query每次调用都限定在一个 space 中,且 space 来自请求,而不是查询中写入的任何内容。将请求指向另一个 space,
即可读取该 space 的 KI。
The canonical KI schema
标准 KI schema
Elastic's canonical KI indices share these fields. Other AI Indices differ, so treat this as a starting shape and let
describe settle the fields for any given index.
| Field | ES|QL type | Purpose |
|---|---|---|
| keyword | Categorization, e.g. |
| text | Short name of the KI or its backing entity |
| text | Short description of this KI |
| text | Full text: purpose, questions answered, access patterns |
| keyword | Filter facets; multi-valued, so use |
| flattened | Structured keyword-queryable metadata (status, themes, entity names). |
| date | Optional; a KI whose |
| keyword | |
| keyword | The automation that wrote the KI, as |
Semantic sub-fields use dot notation: , , . They exist only
where the mapping defines them; the describe block's section lists the real ones.
title.semanticdescription.semanticcontent.semanticSemantic fieldsElastic 的标准 KI index 共享以下字段。其他 AI Index 会有所不同,因此请将此结构作为起点,并通过
describe 确定任意给定 index 的实际字段。
| 字段 | ES|QL 类型 | 用途 |
|---|---|---|
| keyword | 分类,例如 |
| text | KI 或其实体所对应 backing entity 的短名称 |
| text | 此 KI 的简短描述 |
| text | 完整文本:用途、可回答的问题、access pattern |
| keyword | 筛选 facet;支持多值,因此应使用 |
| flattened | 可通过 keyword 查询的结构化元数据(status、themes、entity names)。 |
| date | 可选; |
| keyword | |
| keyword | 写入该 KI 的 automation,格式为 |
语义子字段使用点号表示法:、、。它们仅在 mapping
定义时才存在;describe 块中的 部分会列出实际存在的字段。
title.semanticdescription.semanticcontent.semanticSemantic fieldsattributes.esql
— a KI's runnable ES|QL
attributes.esqlattributes.esql
— KI 的可运行 ES|QL
attributes.esqlWhen a KI carries runnable ES|QL, it lives in . That is the canonical location; do not look elsewhere
in . The field is optional, so a query must tolerate its absence. The same access pattern is also presented
as prose inside — templates, params, and returns — so reach for when a KI has no ,
or when the description of the query matters more than the query itself.
attributes.esqlattributescontentcontentattributes.esqlattributesflattenedFIELD_EXTRACTesql
FROM <dest.value>
| WHERE governance.lifecycle.status IS NULL OR governance.lifecycle.status == "active"
| WHERE expires_at IS NULL OR expires_at > NOW()
| WHERE type == "detection"
| EVAL esql = FIELD_EXTRACT(attributes, "esql")
| WHERE esql IS NOT NULL
| KEEP title, description, esql
| LIMIT 5A KI may store an array of queries, making the extracted value multivalued. still filters correctly, but
scalar comparisons like skip multivalued rows. Add after the to get one row per
query.
IS NOT NULL==| MV_EXPAND esqlIS NOT NULL当 KI 携带可运行的 ES|QL 时,它存储在 中。这是标准位置;不要在 的其他
位置查找。该字段是可选的,因此查询必须允许它不存在。同一个 access pattern 也会以散文形式呈现在
中——包括模板、params 和返回结果——因此,当 KI 没有 ,或者查询本身的说明比
查询内容更重要时,应使用 。
attributes.esqlattributescontentattributes.esqlcontentattributesflattenedFIELD_EXTRACTesql
FROM <dest.value>
| WHERE governance.lifecycle.status IS NULL OR governance.lifecycle.status == "active"
| WHERE expires_at IS NULL OR expires_at > NOW()
| WHERE type == "detection"
| EVAL esql = FIELD_EXTRACT(attributes, "esql")
| WHERE esql IS NOT NULL
| KEEP title, description, esql
| LIMIT 5一个 KI 可以存储查询数组,因此提取出的值可能是多值的。 仍能正确筛选,但 等标量
比较会跳过多值行。在 之后添加 ,即可为每个查询生成一行。
IS NOT NULL==IS NOT NULL| MV_EXPAND esqlFlow
流程
Step 1 — List the AI indices
第 1 步 — 列出 AI Index
Call . Each entry gives:
GET kbn:/api/context_engine/ai_index- , to pass to describe.
id - , the exact string to put after
dest.value. Use it verbatim: it differs from the id (FROM→sales-knowledge).ai-index-idx-sales-knowledgesays whether it is andest.typeor aindex.data_stream - and
description, to choose between entries.managed
The list is scoped to the caller's space and to what the caller can read. An entry whose backing index is empty or does
not exist yet is still listed; an index the caller lacks on is silently left out.
readSkip this step when your instructions already name the index. Step 2 still applies: describe supplies the target
and the field names either way.
FROM调用 。每个条目都提供:
GET kbn:/api/context_engine/ai_index- ,用于传给 describe。
id - ,即放在
dest.value之后的精确字符串。必须原样使用:它与 id 不同(FROM→sales-knowledge)。ai-index-idx-sales-knowledge表示它是dest.type还是index。data_stream - 和
description,用于在各个条目之间进行选择。managed
该列表受调用方 space 以及调用方读取权限的限制。即使某个条目的底层 index 为空或尚不存在,它仍会被
列出;调用方没有 权限的 index 会被静默排除。
read如果你的指令已经指定了 index,可以跳过此步骤。无论如何,第 2 步仍然适用:describe 会提供
target 和 field name。
FROMStep 2 — Describe the one you picked
第 2 步 — 描述选定的 AI Index
Call with the from Step 1. The is a text
block meant to be read, not parsed: no regexing it into structured data. It contains:
GET kbn:/api/context_engine/ai_index/{aiIndexId}/_describeidresponse- the line (the
Query with ES|QL against:target),FROM - , every mapped field as
Fieldspluspath: type/searchable(capped at 500; a path mapped inconsistently across matched indices shows asaggregatable),conflict - , the searchable
Semantic fieldsfields, when any,semantic_text - and
Knowledge item types, the top 20 KITags/typevalues by document count in this space, active and unexpired only,tags - , three ready ES|QL shapes, each opening with the lifecycle pipeline for the index's destination type.
Example queries
The block is capped at ~16k tokens. Read it and use it; do not echo it back to the user.
使用第 1 步得到的 ,调用 。
是一个供阅读而非解析的文本块:不要用正则表达式将其解析为结构化数据。其中包含:
idGET kbn:/api/context_engine/ai_index/{aiIndexId}/_describeresponse- 行(
Query with ES|QL against:target)FROM - :每个 mapped field 均以
Fields加上path: type/searchable表示(最多 500 个;在匹配到的 各 index 之间 mapping 不一致的 path 显示为aggregatable)conflict - :可搜索的
Semantic fields字段(如果存在)semantic_text - 和
Knowledge item types:当前 space 中按文档数统计的前 20 个 KITags/type值,仅包含 有效且未过期的项tags - :三种可直接使用的 ES|QL 结构,每一种都以目标类型对应的 lifecycle pipeline 开头
Example queries
该文本块上限约为 16k tokens。请阅读并使用它;不要将其原样回显给用户。
Step 3 — Query
第 3 步 — 查询
Call with . Build the ES|QL from the describe
block's field list, starting from its example queries, and pass user input as named parameters (, ,
) rather than interpolating it into the query string. The response is ; summarize it for the
user rather than dumping raw rows.
POST kbn:/api/context_engine/ai_index/_query{ query, params?, limit? }?query?type?tag{ columns, values }What the server owns and you cannot override:
| Constraint | Behavior |
|---|---|
| Lifecycle filter | Inserted after |
| Space filter | Applied server-side from the request. Never write a space condition into the query: yours does not replace the server's and can silently match nothing. |
| Row limit | |
| Query size | 10,000 characters max |
| At most 100 entries; keys ≤256 chars, string values ≤4096 chars |
| Index access | The query's |
There is no and no parameter. Express time windows in the ES|QL itself
() or through .
time_rangefilterWHERE @timestamp >= NOW() - 24 hoursparams调用 ,并传入 。以 describe 块中的
示例查询为起点,根据其 field 列表构建 ES|QL,并通过命名参数(、、)传递用户输入,
不要将用户输入插值到查询字符串中。响应为 ;请为用户总结结果,不要直接转储原始行。
POST kbn:/api/context_engine/ai_index/_query{ query, params?, limit? }?query?type?tag{ columns, values }服务器负责且无法覆盖的内容:
| 约束 | 行为 |
|---|---|
| Lifecycle filter | 插入在读取已注册 AI Index 的任何查询的 |
| Space filter | 在服务端根据请求应用。绝不要在查询中写入 space 条件:你的条件不会替代服务端条件,并且可能静默匹配不到任何内容。 |
| Row limit | |
| Query size | 最多 10,000 个字符 |
| 最多 100 个条目;key ≤256 个字符,字符串 value ≤4096 个字符 |
| Index access | 查询的 |
不存在 和 参数。请在 ES|QL 本身中表达时间窗口
(),或通过 传递。
time_rangefilterWHERE @timestamp >= NOW() - 24 hoursparamsLifecycle
生命周期
Open every query with the two lifecycle filters, unless reading retired KIs, and end row-returning queries in
(aggregations end in ): the query then reads as what it returns without pulling into context.
KEEPSTATSgovernance.*esql
| WHERE governance.lifecycle.status IS NULL OR governance.lifecycle.status == "active"
| WHERE expires_at IS NULL OR expires_at > NOW()The query API adds these two filters and to any query that omits them, and on a data stream always
keeps only the newest revision per (adding when missing). A top-level on a lifecycle
field switches off that field's filter only; showing the field in does not. Any column named
anywhere in the query, the opening status filter included, switches off the , so a query that opens with the two
filters returns columns unless it ends in or . An index that is not registered as an AI
Index is read as-is.
DROP governance.*idMETADATA _id, _indexWHEREKEEPgovernance.*DROPgovernance.*KEEPSTATS除非需要读取已退役的 KI,否则每个查询都应以两个 lifecycle filter 开头。返回行的查询应以
结束(聚合查询则以 结束):这样查询所呈现的内容就等同于其返回结果,而不会将
带入上下文。
KEEPSTATSgovernance.*esql
| WHERE governance.lifecycle.status IS NULL OR governance.lifecycle.status == "active"
| WHERE expires_at IS NULL OR expires_at > NOW()如果查询未包含这两项 filter,查询 API 会自动添加它们以及 ;对于 data stream,它始终只
保留每个 的最新 revision(缺少时还会添加 )。顶层 只会关闭对应 lifecycle
field 的 filter;在 中显示该 field 不会关闭 filter。查询任意位置只要引用了 column,
包括开头的 status filter,就会关闭 。因此,以这两个 filter 开头的查询会返回 columns,
除非最终使用 或 。未注册为 AI Index 的 index 将按原样读取。
DROP governance.*idMETADATA _id, _indexWHEREKEEPgovernance.*DROPgovernance.*KEEPSTATSExamples
示例
These run as-is against canonical KI indices. For any other AI Index, adapt the field names from the describe block:
does not exist unless the mapping has it.
title.semantic以下示例可直接用于标准 KI index。对于其他 AI Index,请根据 describe 块调整 field name:
除非 mapping 中存在 ,否则该字段不可用。
title.semanticFull-text search, lexical and semantic fused
全文搜索,融合词法与语义搜索
esql
FROM ai-index-idx-sales-knowledge METADATA _id, _index, _score
| WHERE governance.lifecycle.status IS NULL OR governance.lifecycle.status == "active"
| WHERE expires_at IS NULL OR expires_at > NOW()
| FORK
( WHERE MATCH(title, ?query) OR MATCH(description, ?query) OR MATCH(content, ?query) | SORT _score DESC | LIMIT 20 )
( WHERE MATCH(title.semantic, ?query) OR MATCH(description.semantic, ?query) OR MATCH(content.semantic, ?query) | SORT _score DESC | LIMIT 20 )
| FUSE
| SORT _score DESC, _id ASC
| KEEP title, description, content, type, tags
| LIMIT 5Called with the search phrase as a parameter:
json
{ "query": "<the esql above>", "params": { "query": "refund policy for annual plans" }, "limit": 5 }esql
FROM ai-index-idx-sales-knowledge METADATA _id, _index, _score
| WHERE governance.lifecycle.status IS NULL OR governance.lifecycle.status == "active"
| WHERE expires_at IS NULL OR expires_at > NOW()
| FORK
( WHERE MATCH(title, ?query) OR MATCH(description, ?query) OR MATCH(content, ?query) | SORT _score DESC | LIMIT 20 )
( WHERE MATCH(title.semantic, ?query) OR MATCH(description.semantic, ?query) OR MATCH(content.semantic, ?query) | SORT _score DESC | LIMIT 20 )
| FUSE
| SORT _score DESC, _id ASC
| KEEP title, description, content, type, tags
| LIMIT 5使用搜索短语作为参数调用:
json
{ "query": "<the esql above>", "params": { "query": "refund policy for annual plans" }, "limit": 5 }Filter by KI type and tag
按 KI 类型和标签筛选
esql
FROM ai-index-idx-sales-knowledge
| WHERE governance.lifecycle.status IS NULL OR governance.lifecycle.status == "active"
| WHERE expires_at IS NULL OR expires_at > NOW()
| WHERE type == ?type AND MATCH(tags, ?tag)
| KEEP title, description, content, type, tags
| LIMIT 5esql
FROM ai-index-idx-sales-knowledge
| WHERE governance.lifecycle.status IS NULL OR governance.lifecycle.status == "active"
| WHERE expires_at IS NULL OR expires_at > NOW()
| WHERE type == ?type AND MATCH(tags, ?tag)
| KEEP title, description, content, type, tags
| LIMIT 5Count KIs by type
按类型统计 KI 数量
A first probe to confirm the index holds KIs visible from this space:
esql
FROM ai-index-idx-sales-knowledge
| WHERE governance.lifecycle.status IS NULL OR governance.lifecycle.status == "active"
| WHERE expires_at IS NULL OR expires_at > NOW()
| STATS count = COUNT(*) BY type
| SORT count DESC
| LIMIT 20先执行一次探测查询,以确认该 index 中包含当前 space 可见的 KI:
esql
FROM ai-index-idx-sales-knowledge
| WHERE governance.lifecycle.status IS NULL OR governance.lifecycle.status == "active"
| WHERE expires_at IS NULL OR expires_at > NOW()
| STATS count = COUNT(*) BY type
| SORT count DESC
| LIMIT 20Read retired KIs, only when asked
读取已退役的 KI(仅在用户提出要求时)
Only when the user asks about deleted or expired knowledge. Tombstoned and expired KIs stay readable, on an index or a
data stream:
- Tombstoned: a on
WHEREturns off the status filter and, being agovernance.lifecycle.statuscolumn, thegovernance.*too; the expiry filter still applies.DROP - Expired: a on
WHEREturns off the expiry filter; the status filter still applies.expires_at
Nothing else is readable: a KI whose document was removed is gone, and older revisions on a data stream are never
returned.
esql
FROM ai-index-idx-sales-knowledge
| WHERE governance.lifecycle.status == "deleted"
| KEEP title, governance.provenance.created_by.uri
| LIMIT 20On a data stream, the same query returns the KIs whose newest revision is a tombstone:
esql
FROM ai-index-ds-sales-knowledge
| WHERE governance.lifecycle.status == "deleted"
| KEEP title, governance.provenance.created_by.uri
| LIMIT 20仅当用户询问已删除或已过期的 knowledge 时才执行。Tombstoned 和 expired KI 在 index 或 data stream
中仍然可读:
- Tombstoned: 对 使用
governance.lifecycle.status会关闭 status filter;由于它也是一个WHEREcolumn,因此也会关闭governance.*。Expiry filter 仍然生效。DROP - Expired: 对 使用
expires_at会关闭 expiry filter;status filter 仍然生效。WHERE
除此之外的内容都不可读:文档已被移除的 KI 已经消失,data stream 中较旧的 revision 也永远不会返回。
esql
FROM ai-index-idx-sales-knowledge
| WHERE governance.lifecycle.status == "deleted"
| KEEP title, governance.provenance.created_by.uri
| LIMIT 20在 data stream 中,同一查询会返回最新 revision 为 tombstone 的 KI:
esql
FROM ai-index-ds-sales-knowledge
| WHERE governance.lifecycle.status == "deleted"
| KEEP title, governance.provenance.created_by.uri
| LIMIT 20Diagnosing
故障诊断
These failure modes look alike from the outside and have different fixes. Work down the table.
| Symptom | Cause | Fix |
|---|---|---|
| The installed | Update the |
| 404 from every Context Engine call in one space | | Turn it on in that space's advanced settings |
| 404 from every Context Engine call on every space | Kibana predates the Context Engine APIs | Check the version against the compatibility note above |
| 403 from every Context Engine call | Caller lacks the Context Engine | Add Context Engine |
| 403 from query or describe only | Missing Elasticsearch index privilege on the backing | Grant |
| Describe returns a block with no counts sections | | Expected; the rest of the block is still usable |
| An AI index you expect is not listed | No | Check privileges and the space the request is scoped to |
| The AI Index is registered but its backing index does not exist yet | Expected for a registration with no data; pick another index |
| Error saying the query response is too large | The rows exceeded the 20 MB response cap | Narrow with |
| Query returns nothing but the index has data | Wrong space: the server-side space filter hides other spaces' documents | Scope the request to the right space |
| A KI you know exists is not returned | It is tombstoned, or its | Filter on |
No | The query names no | Expected; name the field you need, e.g. in |
以下故障模式从外部看相似,但修复方式不同。请按表格顺序排查。
| 症状 | 原因 | 修复方法 |
|---|---|---|
| 已安装的 | 更新 |
| 某个 space 中所有 Context Engine 调用均返回 404 | 该 space 的 | 在该 space 的 advanced settings 中将其开启 |
| 所有 space 中所有 Context Engine 调用均返回 404 | Kibana 版本早于 Context Engine API | 根据上文的兼容性说明检查版本 |
| 所有 Context Engine 调用均返回 403 | 调用方缺少 Context Engine | 为调用方角色添加 Context Engine |
| 只有 query 或 describe 返回 403 | 缺少底层 | 授予 |
| Describe 返回的块中没有计数部分 | | 属于预期情况;该块的其余部分仍可使用 |
| 预期的 AI Index 未被列出 | 对其底层 index 没有 | 检查权限以及请求所限定的 space |
查询已被列出的 id 时出现 | AI Index 已注册,但其底层 index 尚不存在 | 对于没有数据的注册属于预期情况;请选择其他 index |
| 错误提示查询响应过大 | 行数超过了 20 MB 响应上限 | 使用 |
| 查询没有返回结果,但 index 中存在数据 | Space 错误:服务端 space filter 隐藏了其他 space 的文档 | 将请求限定到正确的 space |
| 已知存在的 KI 未被返回 | 它已被标记为 tombstone,或其 | 在 |
结果中没有 | 查询未引用任何 | 属于预期情况;通过 |
Guidelines
准则
- Never skip describe. A query written from memory could fail, or silently returns nothing.
- Read AI Indices only through . A direct Elasticsearch query or a cluster-wide ES|QL query (
POST kbn:/api/context_engine/ai_index/_query) bypasses the space scoping, the lifecycle filter, and the row cap: it returns every revision, deleted and expired ones included. Consult thePOST /_queryskill for ES|QL syntax.elasticsearch-esql - Start at 5 and narrow the columns with
limit. The whole result enters your context.KEEP - If the top 5 don't answer the question, check how they fall short: on topic but incomplete → raise the limit; off
topic → the query is wrong, so reword the search terms or loosen the rather than asking for more rows.
WHERE - Answer from the rows and cite the KI titles; do not dump the raw result.
- An empty result means no current KI. Do not read tombstones or expired KIs unless the user asks about deleted or expired knowledge.
- 绝不跳过 describe。凭记忆编写的查询可能失败,也可能悄无声息地返回空结果。
- 仅通过 读取 AI Index。直接执行 Elasticsearch query,或执行 集群范围的 ES|QL query(
POST kbn:/api/context_engine/ai_index/_query),会绕过 space scoping、lifecycle filter 和行数上限,并返回 所有 revision,包括已删除和已过期的内容。有关 ES|QL 语法,请参阅POST /_queryskill。elasticsearch-esql - 从 5 开始,并通过
limit缩小 column 范围。整个结果都会进入你的上下文。KEEP - 如果前 5 条无法回答问题,请检查其不足之处:主题相关但不完整 → 提高 limit;主题不相关 → 查询有误,
应改写搜索词或放宽 ,而不是要求返回更多行。
WHERE - 根据结果行作答,并引用 KI title;不要转储原始结果。
- 空结果表示不存在当前 KI。除非用户询问已删除或已过期的 knowledge,否则不要读取 tombstone 或 expired KI。
Out of scope
范围之外
- Creating, updating, or deleting AI indices, and managing their /
sources/automationsconfig.feedback_analysis - Generating Knowledge Indicators, or deciding what an AI Index should contain. That is the Context Engine's automations and its analyze-and-improve feedback loop, not query time.
- 创建、更新或删除 AI Index,以及管理其 /
sources/automations配置。feedback_analysis - 生成 Knowledge Indicator,或决定 AI Index 应包含哪些内容。这属于 Context Engine 的 automations 及其 analyze-and-improve feedback loop,而不属于 query time。
Operations
操作
| HTTP API (shorthand) | |
|---|---|
| |
| |
| |
| |
| HTTP API(简写) | |
|---|---|
| |
| |
| |
| |