Giter VIP home page Giter VIP logo

azurecognitivesearch-rag's Introduction

Introduction

This is a simple C# demo highlighting how to have conversational interactions with private data in Azure using Azure Cognitive Search and Azure OpenAI.

Azure Cognitive Search is used for Retrieval Augmented Generation.

Requirements

You should have the following resources set up on Azure,

  • Azure Storage Container: This will host your private documents (PDF, Word, Excel,...) that you want to use as the knowledge base. The storage account is added as a data source of your search service.
  • Azure Cognitive Search Service: The service should be set up in a standard tier which will ensure you can use Semantic Search. Add the storage container as a data source for the search service and set up the indexer, index, and Semantic Search configuration.
  • Azure OpenAI: Add a model deployment to your Azure OpenAI service, either GPT 3.5 Turbo or GPT 4.

User Secrets

Add user secrets to the console project as follows, with the neccessary values specified.

{
  "AzureOpenAISettings": {
    "ServiceKey": "<Key>",
    "ServiceName": "<Service-Name>",
    "DeploymentName": "<Model-Deployment-Name>",
    "Endpoint": "https://<Service-Name>.openai.azure.com",
    "MaxCompletionTokens": 500,
    "MaxModelTokens": 8192,
    "Instructions": "Assistant is an intelligent chatbot..."
  },
  "AzureCognitiveSearchSettings": {
    "ServiceKey": "<Key>",
    "ServiceName": "<Service-Name>",
    "Index": "<Index-Name>",
    "SemanticConfig": "<Semantic-Config-Name>",
    "ApiVersion": "<API-Version>",
    "ApiURL": "https://<Service-Name>.search.windows.net/indexes/<Index-Name>/docs?api-version=<API-Version>&search={0}&queryLanguage=en-US&queryType=semantic&captions=extractive&answers=extractive%7Ccount-3&semanticConfiguration=<Semantic-Config-Name>"
  }
}

azurecognitivesearch-rag's People

Contributors

meshackmusundi avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.