What is NL Cache Framework?
NL Cache Framework (ThinkForge) is a caching system that stores natural language queries and maps them to structured outputs such as SQL queries, API calls, URLs, or workflow templates. It uses embeddings for semantic similarity search to retrieve the most relevant cached entry for a given input query, improving response accuracy and speed for NLP applications.
How to use NL Cache Framework?
Clone the repository, set up the backend (install Python dependencies, initialize the database, start the server with python app.py) and the frontend (install npm dependencies, run npm run dev). Access the UI at http://localhost:3000 to manage cache entries, test queries, or bulk import CSV files. Use the REST API endpoints (e.g., POST /v1/complete) to process natural language queries programmatically.
Key features of NL Cache Framework
- Semantic similarity search using embeddings
- Supports SQL, API, URL, and workflow templates
- Entity extraction and substitution into templates
- Full CRUD REST API for cache management
- Interactive dashboard for managing and testing entries
- Reasoning trace capture and template validation
- Usage tracking for analytics
Use cases of NL Cache Framework
- Accelerating natural language to SQL query generation
- Caching and reusing API call templates from user questions
- Providing instant structured responses for frequently asked queries
- Enabling offline or low-latency retrieval of precomputed outputs
- Building a knowledge base of query–template pairs for domain-specific applications
Comments