Metadata-Version: 2.4
Name: gnais
Version: 0.1.2
Summary: Seach tool powered with AI to access GeneNetwork metadata
License: MIT
Author: Johannes Medagbe
Author-email: johanmedagbe@gmail.com
Requires-Python: >=3.13,<3.15
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: chromadb (>=1.5.0,<2.0.0)
Requires-Dist: dspy (>=3.1.3,<4.0.0)
Requires-Dist: langchain (==0.3.26)
Requires-Dist: langchain-community (==0.3.27)
Requires-Dist: pydantic (>=2.12.5,<3.0.0)
Requires-Dist: rank-bm25 (>=0.2.2,<0.3.0)
Requires-Dist: sentence-transformers (>=5.1.2,<6.0.0)
Requires-Dist: torch (>=2.10.0,<3.0.0)
Requires-Dist: tqdm (>=4.67.3,<5.0.0)
Description-Content-Type: text/markdown

# GNAIS

## Description

**GNAIS** (GeneNetwork AI Search) is a python package that help digest metadata around GeneNetwork using language models. It allows running natural language queries against RDF data (metadata) converted to text and preprocessed locally.

**GNAIS** performs a hybrid search (keyword and semantic) through a RAG (Retrieval Augmented Generation) system. The embedding model for semantic is Qwen/Qwen3-Embedding-0.6B (open model).

We implemented **GNAIS** using [DSPy](https://dspy.ai/). Switching between LLM providers for the text generation model is as easy as changing a variable :)

## Installation

**GNAIS** is in PyPI. You can install it in your virtual environment using the following commands:

```python
python -m venv .venv
source .venv/bin/activate
pip install gnais
```

## Usage

To use **GNAIS**, you need to define a few variables in your session or script.

```python
CORPUS_PATH=<YOUR_PATH>
PCORPUS_PATH=<YOUR_PATH>
DB_PATH=<YOUR_PATH>
SEED=<YOUR_VALUE>
MODEL_NAME=<DSPY_COMPLIANT_MODEL_NAME>
API_KEY=<YOUR_API_KEY_IF_REQUIRED>
QUERY=<YOUR_QUERY>
```


Once defined, you can run your search with:

```python
from gnais.search import search
search(QUERY)
```


