Sinapsis LlamaIndex
Sinapsis templates for LlamaIndex ingestion, retrieval, reranking, and semantic caching.
🐍 Installation • 🚀 Features • 📚 Usage example • 📙 Documentation • 🔍 License
The sinapsis-llama-index package provides ingestion, retrieval, reranking, and semantic caching templates built on top of LlamaIndex. It is designed to work with Sinapsis packet flows, including plain TextPacket retrieval and LLMConversationPacket.contexts for downstream LLM templates.
🐍 Installation
Install using your package manager of choice. We encourage the use of uv.
Example with uv:
uv pip install sinapsis-llama-index --extra-index-url https://pypi.sinapsis.tech
or with raw pip:
pip install sinapsis-llama-index --extra-index-url https://pypi.sinapsis.tech
🚀 Features
Templates Supported
EmbeddingNodeGenerator: Split text documents into chunks and generate embeddedTextNodeobjects.CodeEmbeddingNodeGenerator: Split source-code repositories withCodeSplitterand embed the resulting nodes.LLaMAIndexInsertNodes: Insert embedded nodes into PostgreSQLPGVectorStoretables.LLaMAIndexNodeRetriever: Retrieve nodes from PGVector for bothTextPacketandLLMConversationPacketinputs.LLaMAIndexReranker: Rerank selectedLLMConversationPacket.contextscategories withSentenceTransformerRerank.LLaMAIndexSemanticCacheLookup: Reuse cached LLM responses from PGVector when a semantically similar prompt is found under the same request scope.LLaMAIndexSemanticCacheWrite: Persist completed LLM responses into a PGVector-backed semantic cache for future reuse.LLaMAIndexClearTable: Clear all rows from a PGVector table while keeping its schema.LLaMAIndexDeleteTable: Drop a PGVector table and remove all stored vectors.
📚 Usage example
The following configuration assumes a PGVector table is already populated and shows a typical retrieval pipeline:
create an LLMConversationPacket, retrieve candidate contexts from PGVector, and rerank them before a downstream LLM template consumes the results.
Config
agent:
name: reranker_demo
description: Retrieve and rerank help-center contexts before they are consumed by an LLM.
templates:
- template_name: InputTemplate
class_name: InputTemplate
attributes: {}
- template_name: LLMConversationInput
class_name: LLMConversationInput
template_input: InputTemplate
attributes:
prompt: "How long does the password reset link remain valid?"
system_prompt: "Use the best retrieved context."
- template_name: LLaMAIndexNodeRetriever
class_name: LLaMAIndexNodeRetriever
template_input: LLMConversationInput
attributes:
embedding_config:
model_name: Snowflake/snowflake-arctic-embed-xs
embed_batch_size: 10
device: cpu
trust_remote_code: true
db_config:
user: myuser
password: mypass
port: 5432
host: localhost
db_name: sinapsis_db
table_name: sinapsis_data
retrieve_args:
query_mode: default
similarity_top_k: 8
threshold: 0.3
- template_name: LLaMAIndexReranker
class_name: LLaMAIndexReranker
template_input: LLaMAIndexNodeRetriever
attributes:
rerank_config:
model: cross-encoder/stsb-distilroberta-base
top_n: 2
device: cpu
keep_retrieval_score: false
trust_remote_code: true
rerank_categories:
- rag
📙 Documentation
Documentation for this and other sinapsis packages is available on the sinapsis website
Tutorials for different projects within sinapsis are available at sinapsis tutorials page
🔍 License
This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the LICENSE file.
For commercial use, please refer to our official Sinapsis website for information on obtaining a commercial license.
Metadata
Release files for sinapsis-llama-index 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sinapsis_llama_index-0.3.2.tar.gz | 39.4 kB | Without provenance | Details for sinapsis_llama_index-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sinapsis_llama_index-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for sinapsis_llama_index-0.3.2-py3-none-any.whl |
Total release size: 89.5 kB
Release files / sinapsis_llama_index-0.3.2.tar.gz
| Download URL | sinapsis_llama_index-0.3.2.tar.gz |
|---|---|
| Size | 39.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
344b81fc6f272f368fcae2b0e8a017cc429ef509e09935f0accab64fc3863b2f
|
|
BLAKE2b-256 checksum How to use checksums |
56f8d830b0c1d9fb7721dc8c026cc3358f59ec7c59b2c63f883daed7937cf5e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.16
|
Release files / sinapsis_llama_index-0.3.2-py3-none-any.whl
| Download URL | sinapsis_llama_index-0.3.2-py3-none-any.whl |
|---|---|
| Size | 50.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a59ae640a398cd6cecfa50cbf7fa67f21a4f7dc8be3df258ea373ed8400b32c
|
|
BLAKE2b-256 checksum How to use checksums |
b50ccd08211a9c774cf71891ab551e428dcbdbfbe82f9d31ce2264e9a204f6d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.16
|
Security for sinapsis-llama-index 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.