Skip to content

prawesh-12/prism

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prism — Query Intelligence Endpoint

What I built

  • POST /queries -> accepts a natural language query, uses an LLM to extract structured intelligence (domain, geography, entity types, intent, filters), persists it in memory and returns the full record
  • GET /queries/{id} -> retrieves a stored query record by ID
  • Added a minimal HTML interface to submit queries and view extracted output

Note on LLM

I used Ollama cloud free (gemma3:27b model) via its OpenAI compatible instead of the Anthropic SDK as currently I don't have Anthropic API key.


Preview UI


How to run (for Ubuntu 24.04.4 LTS x86_64 )

  • python -m env env -> create virtual environment
  • source venv/bin/activate -> activate virtual environment
  • pip install -r requirements.txt -> install all the requirements
  • Copy .env.example to .env and fill in your Ollama credentials
  • uvicorn main:app --reload --env-file .env -> to load env and run
  • Open http://localhost:8000 or use the Swagger UI at http://localhost:8000/docs

One thing I would change with more time

Swap the in-memory dict for SQLite so query records persist across server restarts.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors