Searchable Document Collection - Query

This ask allows to query a searchable document collection with ChatComplete.

Input

Description

This feature enables you to search a document collection using ChatComplete. You can effortlessly incorporate a document collection by employing the Searchable Document Collection - Add Document task. Once your documents are in the collection, you can ask questions, and ChatComplete will provide answers.

Applications

  • Knowledge Base ChatBots
  • Semantic Information Retrieval from Document Collections

How to use the task

  • Specify the name of the document collection you've already populated using the Searchable Document Collection - Add Document task.
  • The Quality slider can be adjusted. A higher quality may impact price and performance of the task.
  • Formulate your query

Privacy

We strongly advise against including sensitive or confidential information in your queries.

[1.0.0]:
First version
VersionAI ModelCreatedLink
1.0.019.10.2023

API

The REST API allows you to call the tool with the same costs as when running the tool. Please generate an Personal access token before using the REST API.

Parameters

  • query (Query): The query.
  • quality (Quality): The quality of the response. Affects the price.
  • document_collection (Document Collection): The name of the document.
  • Call the REST API by cURL
    curl -v -H "Authorization: Bearer PERSONAL_ACCESS_TOKEN" https://api.anysolve.ai/rest/v1/intern-memory-search-collection-query/1.0.0?query=Is%20Woodhouse%20married%3F&quality=2&document_collection=gutenberg
  • Install the package with pip
    python3 -m pip install anysolve
  • Run in python3
    import os
    from anysolve import AnySolve
    anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
    client = AnySolve(anysolve_token)
    res = client.run('intern-memory-search-collection-query','1.0.0', {'query': 'Is Woodhouse married?', 'quality': '2', 'document_collection': 'gutenberg'})
    print(res)
  • Coming soon: Within AnySolve ChatComplete prompts you can use the following command to execute the task:
    /run('intern-memory-search-collection-query','1.0.0', query='Is Woodhouse married?', quality='2', document_collection='gutenberg')