End to end Semantic Search App

We can run this application either on a localhost or a server.

We show the step-by-step guide to build an end-to-end search application. We first set the OpenAI api key.

export OPENAI_API_KEY=<API-KEY>

Under the repo directory, we can run the following command to launch a streamlit search app. The source code can be found at here.

poetry run streamlit run examples/denser_search.py

This command first builds a mini retriever with the following code.

index_name = "unit_test_titanic"
retriever = RetrieverGeneral(index_name, "tests/config-titanic.yaml")
retriever.ingest("tests/test_data/titanic_top10.jsonl")

It then launches a webpage with interactive UI so users can input queries. Once it is launched, we will see a search interface similar to the following screenshot. We can input any queries, along with the filters to search relevant results. Below shows an example query of cumings with Sex field is filled with female. The retriever returns the relevant passages which matches the specified filter value.

Denser Chat

Last updated on