[ADD] PoC working with our database. playground jq
This commit is contained in:
40
README.md
40
README.md
@@ -36,11 +36,25 @@ This is a **Proof of Concept (PoC)** that demonstrates the conversion of natural
|
||||
|
||||
### Running the PoC
|
||||
|
||||
**Query Generation Only (Default):**
|
||||
|
||||
```bash
|
||||
npm start
|
||||
```
|
||||
|
||||
This will process the hardcoded natural language query and output the generated ODMDB query in JSON format.
|
||||
**Query Generation + Execution:**
|
||||
|
||||
```bash
|
||||
EXECUTE_QUERY=true npm start
|
||||
```
|
||||
|
||||
**With Custom ODMDB Server:**
|
||||
|
||||
```bash
|
||||
EXECUTE_QUERY=true ODMDB_BASE_URL=http://localhost:8080 npm start
|
||||
```
|
||||
|
||||
This will process the hardcoded natural language query and output the generated ODMDB query in JSON format. When `EXECUTE_QUERY=true`, it will also execute the query against the ODMDB server.
|
||||
|
||||
### Changing the Query
|
||||
|
||||
@@ -57,8 +71,32 @@ const NL_QUERY = "your natural language query here";
|
||||
- `"find recent seekers with job titles and salary expectations"`
|
||||
- `"show me seekers from yesterday with their skills"`
|
||||
|
||||
### Testing jq Processing
|
||||
|
||||
To test the jq processing capabilities with mock data:
|
||||
|
||||
```bash
|
||||
node test-jq.js
|
||||
```
|
||||
|
||||
This demonstrates various jq operations including:
|
||||
|
||||
- Basic data formatting and field selection
|
||||
- CSV conversion from JSON
|
||||
- Advanced filtering and transformations
|
||||
- Statistical summaries and aggregations
|
||||
|
||||
## Environment Variables
|
||||
|
||||
- `OPENAI_API_KEY` - Your OpenAI API key (required)
|
||||
- `EXECUTE_QUERY` - Set to "true" to execute queries against ODMDB (default: false)
|
||||
- `ODMDB_BASE_URL` - ODMDB server URL (default: http://localhost:3000)
|
||||
- `ODMDB_TRIBE` - ODMDB tribe name (default: smatchit)
|
||||
- `OPENAI_MODEL` - OpenAI model to use (default: gpt-5)
|
||||
|
||||
## Output Format
|
||||
|
||||
**Query Generation:**
|
||||
The PoC generates ODMDB queries in this format:
|
||||
|
||||
```json
|
||||
|
Reference in New Issue
Block a user