Skip to content

Elsai Parsers & NLI

Natural language interfaces for querying structured data files directly with an LLM.


Elsai Parsers

Package: elsai-parsers  v0.1.0

Natural language querying over Excel files.

Installation

bash
pip install --extra-index-url https://core-packages.elsai.ai/root/elsai-parsers/ elsai-parsers==0.1.0

ExcelParser

python
from elsai_parsers.excel_parser import ExcelParser
from elsai_model.azure_openai import AzureOpenAIConnector
from elsai_embeddings.azure_openai import AzureOpenAIEmbeddingModel
from elsai_vectordb.chromadb import ChromaVectorDb

llm = AzureOpenAIConnector(...)
embedding_model = AzureOpenAIEmbeddingModel(...)
vector_db = ChromaVectorDb(persist_directory="./db")

parser = ExcelParser(
    file_path="sales_data.xlsx",
    llm=llm,
    embedding_model=embedding_model,
    vector_db=vector_db,
)

# Ask natural language questions
answer = parser.query("What were the total sales in Q3 2024?")
print(answer)

answer = parser.query("Which product had the highest revenue last year?")
print(answer)

answer = parser.query("Show me monthly sales trends for the Electronics category.")
print(answer)

For large files, the parser automatically chunks and indexes the spreadsheet data using the vector database.


Elsai NLI

Package: elsai-nli  v0.1.0

Natural language interface for CSV files using an LLM agent.

Installation

bash
pip install --extra-index-url https://core-packages.elsai.ai/root/elsai-nli/ elsai-nli==0.1.0

CSVAgentHandler

python
from elsai_nli.natural_language_interface import CSVAgentHandler
from elsai_model.azure_openai import AzureOpenAIConnector

llm = AzureOpenAIConnector(...)

handler = CSVAgentHandler(
    file_path="employees.csv",
    llm=llm,
)

# Ask questions in natural language
result = handler.query("How many employees are in the Engineering department?")
print(result)

result = handler.query("What is the average salary by department?")
print(result)

result = handler.query("List all employees hired after 2022.")
print(result)

The agent converts your question into pandas operations and executes them on the CSV file.

Copyright © 2026 Elsai Foundry.