The PromptQL runtime and DDN API
PromptQL enables accurate and effective data querying and computation, and enables agents to interact with large user-private datasets.
Why AI agents perform poorly on real-world data
- LLM performance drops off a cliff for even small megabyte-sized context sizes
- User data is locked behind non standard and inexpressive APIs. The LLM must learn to query each API. Data composition is non-trivial.
- Existing retrieval systems are opaque black boxes and are difficult to verify for correctness or completeness
- Exposing existing data sources or APIs to LLMs is often a no-go due to data security concerns
This makes LLMs in isolation an unsuitable and unreliable tool for unlocking the value of large and personal datasets.
Parts of PromptQL
First, DDN enables you to build a rock solid and consistent API across all your different data sources. User permissions are built into the API. This means that regardless of the data source, you can query it using the same standardised API interface that supports complex expressive queries with filtering, sorting, aggregation, joins, etc. This API also exposes mutations that allow you to act on the data.
Next, PromptQL gives the LLM a Python runtime. This enables explicit and structured computation and data transformation. Effectively, the LLM writes Python code. The Python code can make multiple API queries and combine the results.
In addition, PromptQL gives the LLM access to structured memory via data artefacts. Results from previous queries can be referenced directly in later queries.
PromptQL can use the returned data or error response and reason iteratively, firing off additional queries as needed.
How PromptQL solves the problem
This set up allows PromptQL to plan and solve the problem in a methodical manner.
Writing code is the most effective way to get LLMs to reason and execute on complex multi-step tasks. (How many r’s in the word “strawberry”?)
PromptQL is aware of the complete data schema. Using the expressive data API, it can accurately retrieve only the specific data it needs to solve a problem. Vector embeddings are naturally supported. The data API is often better at retrieval: a simple example is filtering by date range. Also, the data API is based on SQL and LLMs are already really good at SQL.
PromptQL is the user’s agent, it captures and acts on the user’s intent. PromptQL makes the API queries on behalf of the user, it uses the user’s authentication credentials to make API requests. Since authorization is baked into the DDN API, the LLM can never access data that the user does not have access to.
Since PromptQL can plan over multiple steps, it can also use LLMs more effectively. For example, it can retrieve a narrow set of rows, use an LLM model to classify each of the rows in turn, and then summarize the results for you.
PromptQL gives LLMs the necessary tools to unhobble their intelligence.