BindAI Knowledge
bindai-knowledge provides knowledge and retrieval building blocks for the BindAI framework.
It provides abstractions for loading documents, splitting them into chunks, generating embeddings, storing knowledge, searching, reranking results, and building knowledge pipelines.
Features
- Knowledge collections
- Knowledge documents and chunks
- Document loaders
- Document chunking
- Embedding support
- Knowledge providers
- Knowledge search options
- Result reranking
- Knowledge pipelines
- Conversation-aware queries
- In-memory knowledge storage
- JSON-backed knowledge storage
- Vector knowledge providers
- Fake and dummy embedding providers
Public API
The package exposes the main knowledge abstractions directly from bindai_knowledge:
from bindai_knowledge import (
Knowledge,
KnowledgeDocument,
KnowledgeChunk,
KnowledgeProvider,
KnowledgeResult,
KnowledgeSearchOptions,
KnowledgePipeline,
)
Document Loading
BindAI Knowledge provides loaders for several document sources:
TextLoaderMarkdownLoaderPDFLoaderHTMLLoaderDirectoryLoader
The common loader contract is provided by DocumentLoader.
from bindai_knowledge import (
DocumentLoader,
TextLoader,
)
loader = TextLoader()
Specific loader behavior depends on the loader implementation and its input requirements.
Document Chunking
Documents can be divided into knowledge chunks using the provided chunkers:
DocumentChunkerFixedChunkerRecursiveChunker
These components provide the preprocessing layer used before embedding and knowledge storage.
Embeddings
The package integrates with the BindAI embedding abstraction:
from bindai_knowledge import EmbeddingProvider
# Implementations can provide embeddings for knowledge documents.
Development and testing implementations include:
FakeEmbeddingProviderDummyEmbeddingProvider
Knowledge Providers
The KnowledgeProvider abstraction defines the provider boundary for knowledge storage and retrieval.
Available implementations include:
InMemoryKnowledgeProviderJsonKnowledgeProviderVectorKnowledgeProvider
This allows applications to use different storage strategies without changing the higher-level knowledge abstractions.
Search and Reranking
Knowledge search can be configured using KnowledgeSearchOptions.
The package also provides reranking abstractions and a lexical implementation:
RerankerLexicalReranker
Knowledge Pipeline
KnowledgePipeline provides a higher-level abstraction for composing knowledge-processing operations.
The package also provides ConversationQuery for knowledge queries that incorporate conversational context.
Architecture
The knowledge layer can be viewed conceptually as:
Documents
│
▼
Document Loaders
│
▼
Chunking
│
▼
Embeddings
│
▼
Knowledge Provider
│
▼
Search
│
▼
Reranking
│
▼
Knowledge Results
BindAI Knowledge provides the components at each stage while allowing implementations to be selected independently.
Development
This package is part of the BindAI workspace.
From the repository root:
uv sync
Run the complete test suite:
uv run pytest
Run static type checking for this package:
uv run mypy packages/bindai-knowledge
Documentation
For complete BindAI framework documentation:
License
BindAI is released under the MIT License.
Metadata
Release files for bindai-knowledge 0.2.0
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 |
|---|---|---|---|---|
| bindai_knowledge-0.2.0.tar.gz | 14.9 kB | Without provenance | Details for bindai_knowledge-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bindai_knowledge-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for bindai_knowledge-0.2.0-py3-none-any.whl |
Total release size: 35.8 kB
Release files / bindai_knowledge-0.2.0.tar.gz
| Download URL | bindai_knowledge-0.2.0.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72186c1b15cc9579f0abd17cc3f646ba6d9fdb679a1a7ff66323f9efc4cb17a3
|
|
BLAKE2b-256 checksum How to use checksums |
f884141d710006b8034fd86db377af9c81119776bb41e68be780749cdebc845b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / bindai_knowledge-0.2.0-py3-none-any.whl
| Download URL | bindai_knowledge-0.2.0-py3-none-any.whl |
|---|---|
| Size | 20.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c377e544ddaa8688e376a41783f26e8619b8f36f4f99c1beb1da4cd0fadc029b
|
|
BLAKE2b-256 checksum How to use checksums |
d95d7f02e35710f1fdbe4bf4c3e59fc3d6550fd460ce80f1ecc34c1eef9c2af8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Security for bindai-knowledge 0.2.0
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.