Teach & ask
Teach the pack your business knowledge: definitions, the names your team uses, and decisions your data does not record. Then start asking questions.
To upload files, see Add documents. To set up a pack for your team from start to finish, see Set up a Knowledge Pack.
-
Teach it a fact.
Say the fact in chat. The assistant calls
teach. It returns a queued Action.“Teach the growth-metrics pack that an active wallet is any address with a swap in the last 30 days.”
teachtakes exactly one of--textor--file. It returns a queued Action.Terminal window edisyl teach "$PACK" --text "An active wallet is any address with a swap in the last 30 days." -
Wait for it to be indexed. Ingestion runs asynchronously. edisyl chunks, embeds, indexes, and organizes the content. A teach is done only when its content can be retrieved.
The assistant calls
action_getuntil the teach reaches a final status.“Tell me when that teach is indexed.”
Terminal window edisyl action watch <action-id> -
Ask your first question.
Ask in chat. The assistant calls
ask. It waits about 55 seconds for the answer. A slower answer is followed withaction_get.“Ask the growth-metrics pack what counts as an active wallet.”
Terminal window edisyl ask "$PACK" "What counts as an active wallet?" --wait--waitwaits until the answer is ready, then prints it with its evidence. The server waits about 60 seconds. After that, the CLI keeps checking until--timeout(default5m). A slow data question still returns an answer, not only an Action id.
Use ask for every question from now on. You ask one question in plain language and get one cited answer. The answer draws on the pack’s knowledge, connections, and data sources. You never choose between data and knowledge, and you never write SQL.
The assistant calls ask for each question.
“Ask the growth-metrics pack how many swaps happened in the last 7 days.”
edisyl ask "$PACK" "How many swaps in the last 7 days?" --waitWhen you don’t want to wait
Section titled “When you don’t want to wait”Get the Action id and follow the Action instead of waiting:
The assistant calls ask with wait set to false. It gets the Action back at once. It then calls action_get to read the answer.
“Start that question on the growth-metrics pack and check back on it later.”
action_id=$(edisyl ask "$PACK" "<slow data question>" --id-only)edisyl action watch "$action_id" # narrates progress, then prints the answeredisyl action get "$action_id" # read the final answer again, any timeUndoing a teach
Section titled “Undoing a teach”The assistant calls forget. It removes one ingested document and all knowledge created from it. The document’s id is in the teach’s result.
“Forget the document I just taught.”
edisyl forget <pack> <content-record-id> removes one ingested document and all knowledge created from it. It fully reverses teach. Find the content record id with edisyl pack documents list <pack>.
You now have the whole loop: connect, teach, ask. To get a pack ready for its users with objectives and calibration, see Set up a Knowledge Pack.
Next: Improving answers. It covers what to do when ask returns an answer that is not good enough.
Was this page helpful?
Thanks for the feedback.
