Skip to main content

Semantic and hybrid search server

Project description

Example of the agent using RAG

Depends on the just-agents package

This package also has some features which are specific for Just-Chat integration.

It allows easier index for markdown files.

  1. Indexing papers

For indexing what you have to do is run

poetry shell
index_markdown <path_to_markdown_folder> -i <index_name>

this will index all markdown files in the folder and create a Meilisearch index. It will all be indexed in the location where you gave the input files from. NOTE: this is run here, in the just-semantic-search folder but can have targets outside of this folder, for example in other projects.

  1. Searching indexed papers

First off- searching is mostly done in the project you are working on. Meaning that the primary usecase is for the user to import the libary.

2.1. Just-Agents have you should configure a web_agent in your agent_profiles.yaml. You can either user meilisearch separately from just-chat or you can extend the just-chat docker-compose.yml file with the following meilisearch service.

meilisearch:
    container_name: meilisearch
    image: getmeili/meilisearch:v1.13.0-rc.2 # we have to use it because migration got easier
    environment:
      - http_proxy
      - https_proxy
      - MEILI_MASTER_KEY=fancy_master_key
      - MEILI_NO_ANALYTICS=${MEILI_NO_ANALYTICS:-true}
      - MEILI_ENV=${MEILI_ENV:-development}
      - MEILI_LOG_LEVEL
      - MEILI_DB_PATH=${MEILI_DB_PATH:-/data.ms}
      - MEILI_EXPERIMENTAL_ENABLE_METRICS=true
      - MEILI_EXPERIMENTAL_ENABLE_VECTORS=true
    ports:
      - ${MEILI_PORT:-7700}:7700
    volumes:
      - ./data.ms:/data.ms
    restart: unless-stopped

2.2. in requirements.txt you have to add just-semantic-search-meili 2.3. in agent_profiles.yaml you have to add the following tools for the agent you want to use it

      - package: "just_semantic_search.meili.tools"
        function: "search_documents"

This will allow the agent to use the search_documents function from the just_semantic_search.meili.tools package. Also, given you have indexed the papers in this project, the only part from the libary you will use is the search_documents function.

2.4. run

 docker compose up 

and querry the agent so that it will have to search your indexed papers

NOTE: to check things before you run the agent you can first check port 0.0.0.0:7700 to see if the meilisearch is running. -key is fancy_master_key There you should be able to see whether meilisearch is running and if there are indexes created.

Following text explains more in details how this library works and it is structured


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

just_semantic_search_server-0.1.5.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

just_semantic_search_server-0.1.5-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file just_semantic_search_server-0.1.5.tar.gz.

File metadata

  • Download URL: just_semantic_search_server-0.1.5.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.3 Linux/6.8.0-53-lowlatency

File hashes

Hashes for just_semantic_search_server-0.1.5.tar.gz
Algorithm Hash digest
SHA256 01de51a28c9e3a99b43a554c93814e34fcdc48120fcc59df47b5ed63e4ad6770
MD5 0446f103db90f692bbb4e3e4d5d6e1ea
BLAKE2b-256 df9188952cde2e3ab6f1f6028831ada28a4d50559b827be1b98a4ca107337dce

See more details on using hashes here.

File details

Details for the file just_semantic_search_server-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for just_semantic_search_server-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c695da70a81013e84b60841a709fcee4a79c3a771620f8dec5e3c594ad0742cd
MD5 86c171274526c09a0beea7645fe3354f
BLAKE2b-256 c6d5741b004346d7483fb23a6b71b9f3b34adcd1510f9899624d59d8a35b8c50

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page