Azure Cognitive Search - Semantic Search Demo Template

DISCLAIMER: This app is not for production use and is strictly for customers to demo the value that Semantic Search can bring.

This sample app is for customers that want to test out Semantic Search capabilities with their customers index. This app has side-by-side comaparitive functionality that allows you to see Azure Cognitive Search BM25 vs Semantic Search results.

You can find a live demo here.

Prerequisites

Running the app locally

This project can be run anywhere, but VS Code is required for local debugging.

  1. Open the application with VS Code.
  2. Install dependencies
npm install
  1. Create a .env file with the following info:
REACT_APP_SEARCH_DOMAIN="{your-search-service-domain}"
REACT_APP_SEARCH_API_KEY={your-api-key}
REACT_APP_SEARCH_SEMANTIC_CONFIG={your-semantic-config}
REACT_APP_SEARCH_INDEX_NAME={your-index-name}
REACT_APP_SEARCH_CUSTOMER_NAME={your-index-name}
  1. Configure your dataset store
  • Go to Stores > DatasetStore.ts
  • Fill out the below datasetDefinition object based off your index definition to display the documents in the UI appropriatley. Note: attributionField and description are OPTIONAL.
   - fieldNames: [fieldName1, fieldName2, fieldName3, etc]
   - keyField: [keyFieldName]
   - titleField: [titleFieldName]
   - attributionField: [urlFieldName]
   - description: "free input text box describing your dataset"
  1. Run the React Application
npm start

Contribute

If you'd like to contribute, please submit a PR and a member of the Semantic Search Team will approve/reject the PR.