cj-dev-code/semantic_search
0
1---2title: Semantic Book Searcher3emoji: ๐4colorFrom: gray5colorTo: blue6sdk: docker7app_file: Dockerfile8pinned: false9---10 11 12 13# ๐ง Mental Health Semantic Searcher14 15A project to make mental health advice from dense books more accessible through semantic search and quote-level retrieval.16 17## โจ Motivation18 19When you're dysregulated, skimming a whole book or even a chapter can feel overwhelming. This tool helps you search for **therapeutically helpful language** based on what you're feeling or trying to express โ so you can find quotes, not just concepts.20 21---22 23## โ๏ธ Tech Stack24 25- **Python** โ backend logic + semantic chunking26- **Azure AI Search** โ vector search. rejected: Pinecone, FAISS, Vilvus27- **Vector Embeddings** - voyage 3.5. chosen for: intent, emotional, concept rich embedding. rejected: openai (too literal), cohere (unemotional), MPnet MiniLM (poor purpose handling), Google USE (too generic for quote level lookup)28- **Gradio** โ frontend interface. Options rejected: streamlit, dash, next.js, react.29- **GitHub Actions** โ CI pipeline30- **pytest** โ test framework31 32---33 34## ๐ Project Structure35 36```37frontend/ # User interface (Streamlit or React)38backend/ # API + semantic search logic39data/ # Sample books and chunked quote data40notebooks/ # R&D, experiments, visualizations41scripts/ # Setup scripts, evaluators42```43 44---45 46## ๐ง Status47 48- [x] Repo initialized with CI49- [x] Project scaffolded50- [ ] Semantic chunker implemented51- [ ] Retrieval working end-to-end52- [ ] Frontend MVP53 54---55 56## ๐งช Running Tests57 58```bash59pip install -r requirements.txt60pytest61 62---63 64## ๐ Environment Variables65 66Before running the app, create a `.env` file in the project root and define the following:67 68| Variable | Description |69|--------------------|--------------------------------------|70| `VOYAGE_API_KEY` | API key from [Voyage AI](https://voyageai.com) |71| `AAIS_ENDPOINT` | Azure AI Search endpoint URL |72| `AAIS_KEY` | Azure AI Search admin key |73| `OPENAI API KEY` | Openai API key |74| `RUN_DOCKER_TEST` | make this true to run docker tests |75 76You can use the provided `.env.example` file as a template:77 