just-semantic-search-agent


Namejust-semantic-search-agent JSON
Version 0.1.3 PyPI version JSON
download
home_pageNone
SummarySemantic and hybrid search agent
upload_time2025-02-17 23:50:50
maintainerNone
docs_urlNone
authorAnton Kulaga
requires_python<3.15,>=3.11
licenseApache-2.0
keywords python llm science review hybrid search semantic search agent
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Example of the agent using RAG

Depends on the just-agents package

This package also has some features which are specific for [Just-Chat](https://github.com/longevity-genie/just-agents/tree/main/just_chat) integration.

It allows easier index for markdown files.

1. Indexing papers

For indexing what you have to do is run
```bash
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.


2. 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

-----------------------------------------------------------

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "just-semantic-search-agent",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.15,>=3.11",
    "maintainer_email": null,
    "keywords": "python, llm, science, review, hybrid search, semantic search, agent",
    "author": "Anton Kulaga",
    "author_email": "antonkulaga@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d0/06/877b73e15a58692efb8e19f152b0bf0bfabbac63209377b916c19fc5890b/just_semantic_search_agent-0.1.3.tar.gz",
    "platform": null,
    "description": "Example of the agent using RAG\n\nDepends on the just-agents package\n\nThis package also has some features which are specific for [Just-Chat](https://github.com/longevity-genie/just-agents/tree/main/just_chat) integration.\n\nIt allows easier index for markdown files.\n\n1. Indexing papers\n\nFor indexing what you have to do is run\n```bash\npoetry shell\nindex_markdown <path_to_markdown_folder> -i <index_name>\n```\nthis 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.\n NOTE: this is run here, in the just-semantic-search folder but can have targets outside of this folder, for example in other projects.\n\n\n2. Searching indexed papers\n\nFirst off- searching is mostly done in the project you are working on. \nMeaning that the primary usecase is for the user to import the libary.\n\n2.1. Just-Agents have you should configure a web_agent in your `agent_profiles.yaml`.\nYou can either user meilisearch separately from just-chat or you can extend the just-chat docker-compose.yml file with the following meilisearch service.\n```\nmeilisearch:\n    container_name: meilisearch\n    image: getmeili/meilisearch:v1.13.0-rc.2 # we have to use it because migration got easier\n    environment:\n      - http_proxy\n      - https_proxy\n      - MEILI_MASTER_KEY=fancy_master_key\n      - MEILI_NO_ANALYTICS=${MEILI_NO_ANALYTICS:-true}\n      - MEILI_ENV=${MEILI_ENV:-development}\n      - MEILI_LOG_LEVEL\n      - MEILI_DB_PATH=${MEILI_DB_PATH:-/data.ms}\n      - MEILI_EXPERIMENTAL_ENABLE_METRICS=true\n      - MEILI_EXPERIMENTAL_ENABLE_VECTORS=true\n    ports:\n      - ${MEILI_PORT:-7700}:7700\n    volumes:\n      - ./data.ms:/data.ms\n    restart: unless-stopped\n```\n2.2. in `requirements.txt` you have to add `just-semantic-search-meili`\n2.3. in `agent_profiles.yaml` you have to add the following tools for the agent you want to use it\n```\n      - package: \"just_semantic_search.meili.tools\"\n        function: \"search_documents\"\n```\n\nThis will allow the agent to use the search_documents function from the just_semantic_search.meili.tools package.\nAlso, given you have indexed the papers in this project, the only part from the libary you will use is the search_documents function.\n\n2.4. run \n```\n docker compose up \n ``` \n and querry the agent so that it will have to search your indexed papers\n\n\nNOTE: 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``\nThere you should be able to see whether meilisearch is running and if there are indexes created.\n\nFollowing text explains more in details how this library works and it is structured\n\n-----------------------------------------------------------\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Semantic and hybrid search agent",
    "version": "0.1.3",
    "project_urls": null,
    "split_keywords": [
        "python",
        " llm",
        " science",
        " review",
        " hybrid search",
        " semantic search",
        " agent"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fc40a8f351922313643f88b8b82220a589955ea36014be7595086761b586e6af",
                "md5": "c41d82c49b627cf9463e3e1689b6d640",
                "sha256": "a2f790d4b55d788c60d2182fa14fa9df93d7084b799f863d0973877ff71bfa09"
            },
            "downloads": -1,
            "filename": "just_semantic_search_agent-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c41d82c49b627cf9463e3e1689b6d640",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.15,>=3.11",
            "size": 7409,
            "upload_time": "2025-02-17T23:50:48",
            "upload_time_iso_8601": "2025-02-17T23:50:48.977316Z",
            "url": "https://files.pythonhosted.org/packages/fc/40/a8f351922313643f88b8b82220a589955ea36014be7595086761b586e6af/just_semantic_search_agent-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d006877b73e15a58692efb8e19f152b0bf0bfabbac63209377b916c19fc5890b",
                "md5": "a06888309bf3d456f7efa573a21b977a",
                "sha256": "ff318f1ad9d05d0e5fd5f823148cd493355a6ebcfb9fe3e08cc624193df96fea"
            },
            "downloads": -1,
            "filename": "just_semantic_search_agent-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "a06888309bf3d456f7efa573a21b977a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.15,>=3.11",
            "size": 7647,
            "upload_time": "2025-02-17T23:50:50",
            "upload_time_iso_8601": "2025-02-17T23:50:50.162750Z",
            "url": "https://files.pythonhosted.org/packages/d0/06/877b73e15a58692efb8e19f152b0bf0bfabbac63209377b916c19fc5890b/just_semantic_search_agent-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-17 23:50:50",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "just-semantic-search-agent"
}
        
Elapsed time: 0.44282s