Empower people to ask questions

Combining the power of AI with the clarity of a user-friendly query language.

koryki.ai

Now online: Demo Website

koryki.ai improves the interaction of business users with relational databases for searches and data analysis assisted by Large Language Models (LLM). By introducing an easy-to-understand and easily verifiable query language (kql), user remain in the driver's seat.

kql avoids the ambiguities and redundancy of SQL. kql has a consise grammar, making it easy to learn.

Further measures to reduce the complexity users face during data analysis:

  • introducing a business model on top of the database schema using business terms instead of exposing database internals.
  • labeling entity relations to hide join criteria.
  • skip details that humans have in mind or AI-models already know from context or do not need to know.
  • hide database techniques for optimization, like partitioned tables, function-based indexes, precalculated values like soundex, etc..
Each step of abstraction with determined processing reduces the complexity visible to users and LLMs. These determined processes can be handled reliabley by SQL generation. This makes it easier for users to understand and verify the queries to be executed. It also reduces the effort for LLMs to calculate.

Beyond syntax checks, there is no such thing as 'right' or 'wrong' about a query. It all depends on the user's needs and expectations. Assisting the user to understand system behavior is truly most important to increase productivity and quality in data analysis.

MCP-Server

With the help of the koryki.ai MCP–Server, users can gain read access to databases with the support of an AI-model, see Model-Context-Protocol (MCP).

The primary task of the koryki.ai MCP-Server is to bridge the gap between queries in kql-form and the formal languages for relational databases (SQL).

Let's have a look at a sample

User enters:

Find customers who have placed more than 10 orders in January 2023,
return companyname and count, sort by count.

With the help of published resources about koryki.ai, kql-grammar, and the entity-relationship model AI may create a query in kql-form:

FIND customers c, c orders o
FILTER count(o) > 10 AND 
    o.order_date BETWEEN DATE '2023-01-01' AND DATE '2023-01-31'
FETCH c.company_name, count(o) DESC

The same query in SQL, resolved Join Columns:

SELECT
    c.company_name
,   count(o.order_id)
FROM
    customers c
    INNER JOIN orders o ON
        c.customer_id = o.customer_id
WHERE
    o.order_date BETWEEN DATE '2023-01-01' AND DATE '2023-01-31'
GROUP BY
    c.company_name
HAVING
    count(o.order_id) > 10
ORDER BY
    count(o.order_id) DESC

But at least there are two more requirements we have to care about:

  • building a trustworthy system: restrict access to granted areas only, deliver accurate results, avoid misuse, esp. sql-injection
  • best possible response times