Skip to main content

swiftide_query/
lib.rs

1//! Query pipelines for retrieval augmented generation in Swiftide.
2//!
3//! This crate provides the query [`Pipeline`] and its built-in steps:
4//! [`query_transformers`] (subquestion generation, dense and sparse embedding),
5//! [`response_transformers`] (summarizing retrieved documents), [`answers`] (generating the final
6//! answer) and [`evaluators`] (Ragas-compatible evaluation). The step traits and query states live
7//! in `swiftide-core`; retrievers such as Qdrant, pgvector and `LanceDB` come from
8//! `swiftide-integrations`.
9//!
10//! The [`swiftide`](https://docs.rs/swiftide) facade re-exports this crate together with the core
11//! query types as `swiftide::query`. Prefer that unless you want a minimal dependency.
12//!
13//! Guide: <https://swiftide.rs/querying/>
14// show feature flags in the generated documentation
15// https://doc.rust-lang.org/rustdoc/unstable-features.html#extensions-to-the-doc-attribute
16#![cfg_attr(docsrs, feature(doc_cfg))]
17#![cfg_attr(docsrs, doc(auto_cfg))]
18#![doc(html_logo_url = "https://github.com/bosun-ai/swiftide/raw/master/images/logo.png")]
19
20pub mod answers;
21mod query;
22pub mod query_transformers;
23pub mod response_transformers;
24
25pub use query::*;
26pub mod evaluators;