Coder Social home page Coder Social logo

azure-ai-vector-search's Introduction

Step I : Create Embeddings and Metadata

1A. Create Embeddings with the notebook azure_ai_vector_search\notebooks\00.create_embeddings.ipynb
1B. Create Azure OPEN AI Embeddings with the notebook azure_ai_vector_search\notebooks\00.create_embeddings_azure.ipynb

The embeddings are created in azure_ai_vector_search\output
The embeddings are docvectors.json and docvectors_azure.json

Step II : Create Index and Insert Documents[ Embeddings and Metadata ]

  1. Create the index with the notebook azure_ai_vector_search\notebooks\01.azure_ai_vector_search_index_creation.ipynb

Step III : Search

  1. Vector Search , Hybrid Search , Exhaustive KNN exact nearest neighbor search, Semantic Hybrid Search using the notebook azure_ai_vector_search\notebooks\02.azure_ai_vector_search.ipynb

Step IV : Python files for the application

  1. azure_ai_vector_search/backend/azure_ai_vector_search.py is the backend code for the vector search. The code in the notebook is put in a python file for easy deployment.

  2. azure_ai_vector_search\backend\biz_azure_ai_search.py is the wrapper for the backend code present in azure_ai_vector_search/backend/azure_ai_vector_search.py. This file is used to call the backend code from the frontend.

  3. azure_ai_vector_search\backend\config.py has the configurations code.

azure-ai-vector-search's People

Contributors

ambarishg avatar

Stargazers

 avatar raghunandan.karma avatar  avatar Jawad Ahmed avatar Venkata Rajesh Punnamaraju avatar Nguyen Hoang avatar  avatar Manimaran Ramakrishnan avatar  avatar Shiva Prasad avatar Alexander Kastil avatar  avatar Gustavo Bruschi avatar Elias avatar  avatar  avatar  avatar  avatar Lode Nachtergaele avatar Joseph Scarano avatar Andrés Padilla avatar Felipe Gabriel avatar Carlos Ceron avatar

Watchers

 avatar  avatar

azure-ai-vector-search's Issues

Agent stopped due to iteration limit or time limit.

Hi @ambarishg,

Thanks for the repo with insightful notebooks, I have followed one of the notebook and please find the path below:

path for notebook: azure_ai_vector_search/tools/combining-tools-toolkits.ipynb

I tried with my own database and created my custom tool in place of this method i.e tool--> def query_european_soccer(query)

findings:

Question asked for both tool and agent directly:

question: How many tables are there in the database and number of rows in each table?

  1. When I tried to call directly to my custom tool with my database which has sqlagent init. it was generating the output by connecting to the SQLDatabaseAgent. My database has 15 tables, so its throwing the output as below.

output : "Agent stopped due to iteration limit or time limit."
help: can you help us resolving this....

  1. When custom tool is connected with the main "AgentExecutor" and pass the query as input, internally its not calling the custom tool which I have created for sql query generation. below is the output its generating while I am asking the question.

output:

Entering new AgentExecutor chain...Could not parse tool input: {'arguments': "// I cannot directly access the sample sales database as I am a language model AI

However, I can provide you with a query that can be used to retrieve the number of tables and rows in the sample sales database.
To get the number of tables in the sample sales database, you can use the following query:

SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'sample_sales';

To get the number of rows in each table, you can use the following query:

SELECT TABLE_NAME, TABLE_ROWS FROM information_schema.tables WHERE table_schema = 'sample_sales';

Please note that the number of rows in each table may vary depending on the data in the database.

help: can you help us resolving this....

SQL Queries Displayed Instead of Exact Results

I've been trying to run the same colab(Colab: https://github.com/ambarishg/AZURE-AI-VECTOR-SEARCH/blob/main/azure_ai_vector_search/tools/agents.ipynb) with the same database and setup, but instead of getting the exact results, it's returning the SQL queries themselves.

Results:
action_input = "Get the count of players and add 100":

Entering new AgentExecutor chain...
Here's an example of how you can use the query_european_soccer function to get the count of players and add 100:

const { query_european_soccer } = require('./functions');

// Query to get the count of players
const query = `
  SELECT COUNT(*) AS player_count
  FROM Player
`;

// Call the query_european_soccer function with the query
const result = query_european_soccer({ query });

// Get the player count from the result and add 100
const playerCount = result[0].player_count;
const resultWithAdded100 = playerCount + 100;

console.log(resultWithAdded100); // Output: <player count + 100>

Note that you'll need to replace ./functions with the correct path to the file that contains the query_european_soccer function.

Finished chain.

Could you please help me figure out how to solve this issue?

Thanks!

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.