nmai
Collection
norwegian national competition in AI • 3 items • Updated
name stringlengths 8 92 | description stringlengths 9 465 | parameters stringlengths 2 658 | embedding list |
|---|---|---|---|
AccountantDashboardNews_get | Get public news articles | {"from": "integer", "count": "integer", "sorting": "string", "fields": "string"} | [
-0.002808390650898218,
0.010704198852181435,
0.007512243930250406,
-0.06487705558538437,
-0.0019930116832256317,
0.022474462166428566,
-0.009996281005442142,
0.031007472425699234,
0.005642488598823547,
-0.026370637118816376,
-0.011162706650793552,
-0.005023239646106958,
-0.007623438257724047... |
AccountantDashboardNewsTags_getTags | Get all existing news tags | {"from": "integer", "count": "integer", "sorting": "string", "fields": "string"} | [
0.007836827076971531,
0.010070418938994408,
0.014510574750602245,
-0.05840323865413666,
0.0028102502692490816,
0.020883742719888687,
-0.00455425214022398,
0.01729218289256096,
0.011846274137496948,
-0.017251478508114815,
-0.021286655217409134,
-0.007462719455361366,
-0.0072639924474060535,
... |
Activity_get | Find activity by ID. | {"id": "integer", "fields": "string"} | [-0.02207791432738304,0.005358754191547632,0.01944122090935707,-0.07710902392864227,0.01287095993757(...TRUNCATED) |
ActivityList_postList | Add multiple activities. | {} | [-0.0029672023374587297,0.013149230740964413,0.023813853040337563,-0.05793852359056473,0.00613654498(...TRUNCATED) |
ActivityForTimeSheet_getForTimeSheet | Find applicable time sheet activities for an employee on a specific day. | "{\"projectId\": \"integer\", \"employeeId\": \"integer\", \"date\": \"string\", \"filterExistingHou(...TRUNCATED) | [-0.007395702414214611,-0.0006848199409432709,0.008082898333668709,-0.05420083925127983,0.0003475136(...TRUNCATED) |
Activity_search | Find activities corresponding with sent data. | "{\"id\": \"string\", \"name\": \"string\", \"number\": \"string\", \"description\": \"string\", \"i(...TRUNCATED) | [-0.009684063494205475,0.006586596369743347,0.007612462621182203,-0.05575434863567352,0.000798412016(...TRUNCATED) |
Activity_post | Add activity. | {} | [-0.015931224450469017,0.008457685820758343,0.017103616148233414,-0.0805080235004425,0.0126912100240(...TRUNCATED) |
DeliveryAddress_get | Get address by ID. | {"id": "integer", "fields": "string"} | [-0.0183953195810318,-0.00641148304566741,0.01941656693816185,-0.06614109873771667,0.002726383041590(...TRUNCATED) |
DeliveryAddress_put | Update address. | {"id": "integer"} | [-0.00944922398775816,-0.01322043128311634,0.0211179181933403,-0.0693793073296547,-0.013271621428430(...TRUNCATED) |
DeliveryAddress_search | Find addresses corresponding with sent data. | "{\"id\": \"string\", \"addressLine1\": \"string\", \"addressLine2\": \"string\", \"postalCode\": \"(...TRUNCATED) | [-0.008810699917376041,-0.005327471066266298,0.01026651170104742,-0.05883572995662689,-0.01569062843(...TRUNCATED) |
Pre-computed embeddings for 800 Tripletex accounting API tools, extracted from the OpenAPI 3.0.1 spec and embedded with Google gemini-embedding-001 (3072 dimensions).
Built for RAG-based tool filtering in the AI Accounting Agent competition project.
from datasets import load_dataset
# Full embeddings (800 tools, 3072-dim vectors) — ready for RAG
ds = load_dataset("valiantlynxz/tripletex-tool-embeddings")
# Lightweight: tool metadata only, no embedding vectors
ds = load_dataset("valiantlynxz/tripletex-tool-embeddings", name="tools")
| Config | Default | Columns | Size | Use case |
|---|---|---|---|---|
embeddings |
Yes | name, description, parameters, embedding | ~9 MB | RAG search, vector index |
tools |
name, description, parameters | ~50 KB | Browsing, filtering, analysis |
embeddings config
ds = load_dataset("valiantlynxz/tripletex-tool-embeddings")
example = ds["train"][0]
example["name"] # "AccountantDashboardNews_get"
example["description"] # "Get public news articles"
example["parameters"] # '{"from": "integer", "count": "integer", ...}' (JSON string)
example["embedding"] # [3072 floats] — gemini-embedding-001 vector
tools config
ds = load_dataset("valiantlynxz/tripletex-tool-embeddings", name="tools")
example = ds["train"][0]
example["name"] # "AccountantDashboardNews_get"
example["description"] # "Get public news articles"
example["parameters"] # '{"from": "integer", "count": "integer", ...}' (JSON string)
gemini-embedding-001openapi.json included in this repo (3.5 MB, 546 paths, 2167 schemas)from datasets import load_dataset
import lancedb
ds = load_dataset("valiantlynxz/tripletex-tool-embeddings")
# Convert to LanceDB
db = lancedb.connect(".tool_embeddings")
records = [
{
"name": row["name"],
"description": row["description"],
"parameters": row["parameters"],
"embedding": row["embedding"],
}
for row in ds["train"]
]
table = db.create_table("tools", data=records, mode="overwrite")
# Search
results = table.search(query_embedding).limit(100).to_list()
from datasets import load_dataset
import numpy as np
import faiss
ds = load_dataset("valiantlynxz/tripletex-tool-embeddings")
embeddings = np.array(ds["train"]["embedding"], dtype=np.float32)
index = faiss.IndexFlatIP(3072)
faiss.normalize_L2(embeddings)
index.add(embeddings)
# Search
query = np.array([query_embedding], dtype=np.float32)
faiss.normalize_L2(query)
distances, indices = index.search(query, k=100)
tool_names = [ds["train"][int(i)]["name"] for i in indices[0]]
The scripts/ directory contains the original embedding pipeline:
scripts/embeddings.py — Google Gemini embedding providerscripts/rag_tool_filter.py — OpenAPI-to-embedding pipeline + LanceDB vector store# Requires: google-genai, lancedb
# Requires: GCP_API_KEY environment variable
from scripts.embeddings import get_embedding_provider
from scripts.rag_tool_filter import ToolEmbedder, ToolVectorStore, index_openapi_tools
import json, asyncio
with open("openapi.json") as f:
spec = json.load(f)
provider = get_embedding_provider()
embedder = ToolEmbedder(provider)
store = ToolVectorStore(".tool_embeddings")
asyncio.run(index_openapi_tools(spec, store, embedder))
tripletex-tool-embeddings/
├── README.md
├── embeddings.parquet # 800 tools with 3072-dim embeddings
├── tools.parquet # 800 tools metadata only (lightweight)
├── openapi.json # Source Tripletex OpenAPI 3.0.1 spec (3.5 MB)
└── scripts/
├── embeddings.py # Google Gemini embedding provider
└── rag_tool_filter.py # OpenAPI extraction + LanceDB indexing
Part of the nmai project — ai-accounting-agent/.