/// <summary> /// Perform a semantic search of a query over a list of documents /// </summary> /// <param name="query">A query to match against</param> /// <param name="documents">Documents to search over, provided as a list of strings</param> /// <returns>Asynchronously returns a Dictionary mapping each document to the score for that document. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.</returns> public Task <Dictionary <string, double> > GetSearchResultsAsync(string query, params string[] documents) { SearchRequest request = new SearchRequest(query, documents); return(GetSearchResultsAsync(request)); }
/// <summary> /// Perform a semantic search over a list of documents, with a specific query /// </summary> /// <param name="request">The request containing the documents to match against</param> /// <param name="query">A query to search for, overriding whatever was provided in <paramref name="request"/></param> /// <returns>Asynchronously returns a Dictionary mapping each document to the score for that document. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.</returns> public Task <Dictionary <string, double> > GetSearchResultsAsync(SearchRequest request, string query) { request.Query = query; return(GetSearchResultsAsync(request)); }
/// <summary> /// Perform a semantic search of a query over a list of documents to get the single best match and its score /// </summary> /// <param name="query">A query to match against</param> /// <param name="documents">Documents to search over, provided as a list of strings</param> /// <returns>Asynchronously returns a tuple of the best matching document and its score. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.</returns> public Task <Tuple <string, double> > GetBestMatchWithScoreAsync(string query, params string[] documents) { SearchRequest request = new SearchRequest(query, documents); return(GetBestMatchWithScoreAsync(request)); }
/// <summary> /// Perform a semantic search over a list of documents with a specific query to get the single best match and its score /// </summary> /// <param name="request">The request containing the documents to match against</param> /// <param name="query">A query to search for, overriding whatever was provided in <paramref name="request"/></param> /// <returns>Asynchronously returns a tuple of the best matching document and its score. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.</returns> public Task <Tuple <string, double> > GetBestMatchWithScoreAsync(SearchRequest request, string query) { request.Query = query; return(GetBestMatchWithScoreAsync(request)); }
/// <summary> /// Perform a semantic search of a query over a list of documents to get the single best match /// </summary> /// <param name="query">A query to match against</param> /// <param name="documents">Documents to search over, provided as a list of strings</param> /// <returns>Asynchronously returns the best matching document</returns> public Task <string> GetBestMatchAsync(string query, params string[] documents) { SearchRequest request = new SearchRequest(query, documents); return(GetBestMatchAsync(request)); }
/// <summary> /// Perform a semantic search over a list of documents with a specific query to get the single best match /// </summary> /// <param name="request">The request containing the documents to match against</param> /// <param name="query">A query to search for, overriding whatever was provided in <paramref name="request"/></param> /// <returns>Asynchronously returns the best matching document</returns> public Task <string> GetBestMatchAsync(SearchRequest request, string query) { request.Query = query; return(GetBestMatchAsync(request)); }