# How does it work?

When you share a website with us we extract all of the text from it (keeping none of the original structure)

We then break that text up into *chunks* of text, each of which are then *vectorized* - this means that they are converted into a set of numbers or *dimensions* ([1,536 to be precise](https://platform.openai.com/docs/guides/embeddings/second-generation-models)) that, when considered together, in their entirety represent the semantic meaning of the text.

We then do the same vectorizing process with the question you ask (to understand the semantic meaning of your question)&#x20;

We then perform a search to try to find the 6 closest (semantically relevant) chunks of text to the question you have asked (which, hopefully, indicates that the question and chunks of text are similar or related).

Once we have the question and chunks of text we put them into a completion prompt in the GPT-4o model (like you would use in ChatGPT) and ask it to answer your question using those pieces of text, its answer is what you see displayed to you.

Simple, eh?


---

# 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://support.myaskai.com/faq/general/how-does-it-work.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.
