Introducing OmniAI Layer: elevating to new heights
What is OmniAI Layer?
OmniAI Layer is an advanced tool that builds on the capabilities of the OmniloyAi library by introducing a semantic layer to its outputs. While the standard Agent has been highly effective, OmniAI Layer takes it a step further by generating JSON queries that can be translated into Python or SQL code. This advancement not only improves accuracy but also makes the results more understandable and traceable, enabling users to gain deeper insights into their data and make more informed decisions. Our AI Agent for Analytics can empower your business teams with trustworthy, instantaneous data answers to their most strategic challenges.
If you want to know even more about our product, do not hesitate to book a demo.
The importance of explainability
OmniloyAi has already set high standards in data analysis, but OmniAI Layer raises the bar by focusing on explainability. As an advanced BI tool for non-technical people, OmniAI Layer creates a JSON query as an intermediary step, making the analysis process more transparent and easier to understand.
Rather than relying solely on complex queries, OmniAI Layer breaks down the analysis into clear, manageable components. This level of transparency is crucial in today’s data-driven world, where clarity and trust in data are essential.
Moreover, OmniAI Layer enhances result accuracy by reducing errors and ambiguities. The JSON query it generates can be easily verified, ensuring that the analysis aligns with user intentions and minimizing the risk of misinterpretations or mistakes.
Streamlining the workflow
OmniAI Layer operates in two key stages: schema generation and JSON query creation. Here’s a closer look at each step:
Schema generation
The first stage involves structuring the data into a schema that OmniAI Layer can use to generate JSON queries. By default, OmniAI Layer automatically creates a schema from the provided dataframes, simplifying the process. However, users can also provide a custom schema to accommodate specific needs or complex data structures.
JSON query generation
In the second stage, OmniAI Layer generates a structured JSON query based on the schema. This query is then converted into executable Python or SQL code to carry out the analysis. As an AI semantic layer, OmniAI Layer translates these JSON queries into code that can be used to create visualizations such as bar graphs or perform other advanced analytics tasks.
Here is a sample JSON query generated by OmniAI Layer:
OmniAI Layer interprets this query and translates it into Python or SQL code, allowing users to perform precise and transparent analyses. With features like a bar graph generator, OmniAI Layer can also visualize these results effectively.
Understanding schema and query structures
To fully utilize OmniAI Layer, it’s important to understand the structure of both the schema and the JSON query. Here’s a brief overview:
- Schema components
- Measures: Quantitative metrics such as averages or counts.
- Dimensions: Categorical variables for slicing the data.
- Joins: Relationships between tables.
- Query fields
- Type: Defines the format of the result (e.g., number, table).
- Dimensions: Columns used for grouping data.
- Measures: Columns used for calculations.
- Filters: Conditions to narrow down the data.
- Order: Specifies how to sort the data.
Using OmniAI Layer in practice
Let’s see OmniAI Layer in action with a practical example. Suppose you have data on employees and their salaries. With OmniAILayer, you can easily analyze this data and gain insights.
Here’s a code snippet showing how to set up and query OmniAI Layer:
This example loads employee and salary data, creates an OmniAI Layer instance, and performs a query to find the average salary in the Marketing department.
Advanced queries with OmniAI Layer
OmniAI Layer is also capable of handling complex queries. For instance, if you want to analyze ticket data from a customer support system, you can define a custom schema and execute advanced queries to gain deeper insights. With features like BI chat GPT, OmniAI Layer also offers conversational capabilities to further enhance your data analysis experience.