{"id":13862473,"url":"https://github.com/nomic-ai/semantic-search-app-template","last_synced_at":"2025-04-11T07:57:40.844Z","repository":{"id":148535207,"uuid":"616529465","full_name":"nomic-ai/semantic-search-app-template","owner":"nomic-ai","description":"Tutorial and template for a semantic search app powered by the Atlas Embedding Database, Langchain,  OpenAI and FastAPI","archived":false,"fork":false,"pushed_at":"2023-09-12T04:39:36.000Z","size":33,"stargazers_count":115,"open_issues_count":0,"forks_count":26,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-25T05:36:11.792Z","etag":null,"topics":["fastapi","openai","react","semantic-search","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nomic-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-20T15:07:18.000Z","updated_at":"2025-03-14T09:30:45.000Z","dependencies_parsed_at":"2024-08-05T06:05:13.508Z","dependency_job_id":"6ee58068-0f0d-48ff-bae3-65c1b5236543","html_url":"https://github.com/nomic-ai/semantic-search-app-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomic-ai%2Fsemantic-search-app-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomic-ai%2Fsemantic-search-app-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomic-ai%2Fsemantic-search-app-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomic-ai%2Fsemantic-search-app-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nomic-ai","download_url":"https://codeload.github.com/nomic-ai/semantic-search-app-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248360085,"owners_count":21090646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","openai","react","semantic-search","tutorial"],"created_at":"2024-08-05T06:01:45.255Z","updated_at":"2025-04-11T07:57:40.816Z","avatar_url":"https://github.com/nomic-ai.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Building a Semantic Search Powered App with Atlas\nTutorial and template for a semantic search app powered by the Atlas Embedding Database and FastAPI. \nOptional integrations include the OpenAI Embedding API and Langchain.\n\n\n### Getting started\nThe typical process for building a semantic search app includes:\n1. Gathering a dataset of text, images or other content you want your app to search through.\n2. Generating [embeddings](https://vaclavkosar.com/ml/Embeddings-in-Machine-Learning-Explained) of your data. This is usually done using an Embedding API such as Cohere or OpenAI.\n3. Writing code that performs vector similarity search over your embeddings and returns back your content.\n4. Integrating all of this into a back-end which you can hit over a REST API.\n\n\nThis app template simplifies the process by providing a ready to deploy FastAPI and React app that interfaces with the [Atlas Embedding Database](https://docs.nomic.ai/how_does_atlas_work.html).\n\nAtlas allow you to upload your content (text documents, embeddings) and instantly access semantic search over your data. Importantly, Atlas comes built with a visual debugger\nallowing you to see the types of results your semantic search app will generate for any query.\n\n\n## Tutorial\n\n### Starting the app\n\nFirst build the FastAPI docker image. You only have to do this on initial build or when you add new dependencies to the requirements.txt file:\n```bash\nDOCKER_BUILDKIT=1 docker build -t backend_api --progress plain -f backend/Dockerfile.buildkit .\n```\n\nThen, start the backend with:\n\n```bash\ndocker compose up --build\n```\n\nYou will need to insert your Nomic API Key (giving your app access to your Atlas Embedding Database instance) into the [settings file](backend/app/api_v1/settings.py) or the [docker compose\nenvironment variables](docker-compose.yaml).\nYou can find this API Key by making an [Atlas](atlas.nomic.ai/cli-login) account.\n\n#### Uploading and indexing your content in Atlas\n\nWe will use demo news data in this tutorial. To upload the demo data go through the [Content Upload Tutorial](tutorial/semantic_search_data_upload.ipynb).\n\nThis tutorial stores your data in an Atlas Embedding DB project called '10k News Articles'.\n\nYou should paste this project name into the [settings file](backend/app/api_v1/settings.py) under the environment variable `atlas_project_name`. Additionally,\npaste in your OpenAI API key into the settings file.\n\n\n#### Spinning up your app\nRun `docker compose up` to spin up the backend. Monitor the logs for errors in-case you forgot to set an environment variable above.\n\n\n### Testing your vector search functionality\n\nOnce the FastAPI ap is started you can access its documentation and test the search endpoint by going to:\n```\nlocalhost:80/docs\n```\n\n\n### Serving the front end\nThe front-end is not implemented yet for this tutorial. Make a PR that builds a React App and we will merge it!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomic-ai%2Fsemantic-search-app-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnomic-ai%2Fsemantic-search-app-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomic-ai%2Fsemantic-search-app-template/lists"}