Java bindings for aijsondb - a thin wrapper on the aijsondb C++ library.
aijsondb is an analytical database that allows you to query your data using JavaScript instead of SQL. The core idea is inspired by DuckDB but optimized for AI/LLM use cases:
- Single JSON document as the data structure
- JavaScript as the query language
- JSON Schema to describe and validate the JSON document
While these choices may not be ideal for humans writing queries, they are well-suited for LLMs generating queries based on natural language input. In comparative tests, aijsondb-based agents achieved 95% correct answers compared to 81% for SQL-based agents.
Supported data sources are:
- JSON data
- XLSX files (Excel)
Two Java modules are available:
aijsondbj/- Main library module (Java wrapper for aijsondb C library)aijsondbjagent/- Agent module containing helpers to create Agent with langchain4j
See the corresponding README files for details.
Samples and sample data can be found here:
aijsondbjweb/- Spring Boot WebApplication for uploading Excel files and analyzing them with natural language questions.scripts/- Example scripts to use with jbang includingaijsondbjcli.javaquery XLSX (Excel) file with JavaScript. (jbang aijsondbjcli.java)aijsondbjlangchain.javacreate an langchain4j AI Agent to talk witch XLSX (Excel) files using Mistar AI, OpenAO or Ollama. (jbang aijsondbjlangchain.java)
data/- Sample data files500 KB_V3.json- Syntetic employees JSON dataset.employeeSchemaDescription_V3.json- JSON Schema for employees dataset.
- aijsondb (C library) - Core database engine
- aijsondb-py - Python wrapper
Contributions are welcome! Please feel free to submit issues or pull requests on GitHub.
For questions or issues, please open an issue on the GitHub repository.
MIT License