airust 0.3.11

A modular Rust knowledge engine: lexical search, text matching, optional semantic retrieval and reranking
Documentation
[
  {
    "input": "What is AIRust?",
    "output": "AIRust is a modular Rust knowledge library. It searches text with BM25 or TF-IDF, compares content, detects duplicate text, and proposes connections based on shared terms. Entries have application-owned IDs, text, and optional metadata. The default library does not require an LLM, HTTP server, database, or PDF parser.",
    "weight": 2.0
  },
  {
    "input": "How do I start AIRust?",
    "output": "Try the source example with cargo run --locked --example core. Start the optional dashboard with cargo run --locked --features web --bin airust. Its default address is http://127.0.0.1:7070, and the console uses the next port. See STARTUP.md for access settings.",
    "weight": 2.0
  },
  {
    "input": "What happens when AIRust starts?",
    "output": "The Engine starts empty and indexes entries supplied by your application. The optional CLI and web features enable embedded sample knowledge. The dashboard opens its local SQLite database and loads stored training examples.",
    "weight": 1.5
  },
  {
    "input": "How do I use the chat?",
    "output": "Start the optional dashboard, open the Chat view, and enter a question. Its compatibility agents select stored training responses. They do not generate original answers with a language model.",
    "weight": 2.0
  },
  {
    "input": "What agents are available?",
    "output": "The compatibility API provides MatchAgent for exact or fuzzy matching, TfidfAgent for BM25 ranking, and ContextAgent for a bounded conversation history. New applications can use Engine directly for search, matching, and relation proposals.",
    "weight": 2.0
  },
  {
    "input": "How do I select agents?",
    "output": "Use the optional dashboard settings to choose exact, fuzzy, BM25, or conversation-history agents. Rust applications can instantiate their required agent or call the shared Engine API directly.",
    "weight": 1.5
  },
  {
    "input": "What agent combinations do you recommend?",
    "output": "Choose the operation that fits the task: search for shared terms, find_matches for spelling or token similarity, and relate for lexical connection proposals. The compatibility agents use different confidence heuristics, so their numbers should not be treated as equivalent probabilities.",
    "weight": 1.5
  },
  {
    "input": "What does confidence mean?",
    "output": "Compatibility agents return a heuristic value between zero and one. Exact matches score one. Fuzzy confidence measures spelling similarity. BM25 confidence is derived from a relevance score. These values are not calibrated probabilities.",
    "weight": 1.5
  },
  {
    "input": "How do I add training data?",
    "output": "Use the optional dashboard training tools, load a JSON KnowledgeBase, or call TrainableAgent::train and append. For the new core, add KnowledgeEntry values through Engine::upsert using stable application-owned IDs.",
    "weight": 2.0
  },
  {
    "input": "How does the training data format look?",
    "output": "A training file is a JSON array of objects with input, output, weight, and optional metadata. Output can be a legacy text string or a structured Text, Markdown, or Json response. Generic Engine entries instead use id, text, and optional metadata.",
    "weight": 1.5
  },
  {
    "input": "How does weight work?",
    "output": "A training example weight influences the legacy BM25 agent ranking. Use finite nonnegative values. The default is 1.0. A weight of zero suppresses that example. Generic knowledge entries do not require a training weight.",
    "weight": 1.0
  },
  {
    "input": "How do I save and load the knowledge base?",
    "output": "Use KnowledgeBase::save and KnowledgeBase::load for training files. The Engine API exports generic entries with to_json and restores them with from_json. The application chooses where to store that JSON.",
    "weight": 1.5
  },
  {
    "input": "Where does the data come from?",
    "output": "Your application supplies knowledge entries. Optional adapters can import JSON, extract text from PDFs, or collect web pages. Check source provenance and content before relying on imported material.",
    "weight": 1.5
  },
  {
    "input": "How do categories work?",
    "output": "The optional dashboard groups training data into categories. The core remains independent of categories: applications can put their own category identifiers in metadata and use Context filters.",
    "weight": 1.0
  },
  {
    "input": "How do bots work?",
    "output": "The optional bot integration fetches and processes web content. It requires the web or bots feature. Crawled content remains external input, and its relevance and trustworthiness must be assessed by the application.",
    "weight": 1.5
  },
  {
    "input": "How does the data review work?",
    "output": "The optional dashboard keeps collected data separate from training knowledge until its review workflow accepts it. Review content and source provenance before adding it to your usable dataset.",
    "weight": 1.0
  },
  {
    "input": "What is the VectorDB?",
    "output": "The optional legacy vector adapters store lexical term weights and compare text through shared vocabulary. They are not neural embeddings or a semantic language model. The core offers TF-IDF cosine ranking over its shared index.",
    "weight": 1.5
  },
  {
    "input": "How does the file manager work?",
    "output": "File management belongs to the optional local dashboard administration tools. Its availability depends on server access settings. The core Engine does not access application files automatically.",
    "weight": 1.0
  },
  {
    "input": "How does the console work?",
    "output": "The optional dashboard console displays server logs and supports fixed administration commands. The console uses the HTTP port plus one. It is not a general-purpose shell.",
    "weight": 1.5
  },
  {
    "input": "How do I change the theme?",
    "output": "Use the optional dashboard settings to choose the visual theme and colors. Theme choices do not affect the knowledge index or search results.",
    "weight": 1.5
  },
  {
    "input": "How do I change the language?",
    "output": "The product interface, documentation, examples, and errors are in English. Search still supports Unicode text, including knowledge written in other languages.",
    "weight": 1.0
  },
  {
    "input": "How do I use AIRust from the command line?",
    "output": "Run cargo run --locked --features cli --bin airust -- cli query tfidf \"What is AIRust?\". Replace tfidf with simple, fuzzy, or context. Use cli interactive for a conversation and cli knowledge for training-file management. Use --help for available commands.",
    "weight": 1.5
  },
  {
    "input": "How do I use Docker?",
    "output": "Build the optional dashboard with docker build -t airust . and follow STARTUP.md for local port mappings, persistent data, and access settings. The default Rust dependency remains a library without a container.",
    "weight": 1.0
  },
  {
    "input": "What API endpoints are available?",
    "output": "The optional HTTP adapter exposes status, querying, training, chat, and optional administration endpoints. The core API consists of ordinary Rust method calls and does not require a network service.",
    "weight": 1.5
  },
  {
    "input": "How do I query the API?",
    "output": "For the optional HTTP adapter, send a JSON POST to /api/query with an input field. The response includes the stored answer, heuristic confidence, winning agent, and optional metadata. Follow STARTUP.md for required access settings.",
    "weight": 1.0
  },
  {
    "input": "How do I use AIRust as a Rust library?",
    "output": "Add airust to your Cargo.toml dependencies. Create Engine::new(), insert KnowledgeEntry::new(\"id\", \"text\") with upsert(), and retrieve matches with search(\"query\", 5). Run the source example with cargo run --locked --example core.",
    "weight": 1.0
  },
  {
    "input": "How does PDF processing work?",
    "output": "Enable the pdf feature to extract text, clean it, and split it into overlapping Unicode-safe chunks. Each chunk can retain file, page, and chunk provenance. Scanned images require separate OCR. The pdf2kb command additionally requires cli and validates its input and output paths.",
    "weight": 1.5
  },
  {
    "input": "What is TF-IDF?",
    "output": "TF-IDF combines term frequency with inverse document frequency. SearchAlgorithm::Tfidf provides cosine ranking with smoothed IDF. The historical TfidfAgent name uses BM25 instead. Both approaches rank shared words and do not automatically recognize synonyms.",
    "weight": 1.5
  },
  {
    "input": "What is Levenshtein distance?",
    "output": "Levenshtein distance counts the character insertions, deletions, and substitutions needed to turn one string into another. AIRust uses it to compare spelling and tolerate small typographical differences.",
    "weight": 1.0
  },
  {
    "input": "How does the Context agent work?",
    "output": "ContextAgent retains a bounded history and appends a formatted history to the query before calling its underlying agent. This can prevent exact matching. For explicit search scopes, use Context to filter eligible entry IDs or metadata.",
    "weight": 1.5
  },
  {
    "input": "What is the architecture of AIRust?",
    "output": "Applications call one shared Engine index. Its modules are text, matching, search, context, knowledge, and index. Compatibility agents, CLI, PDF import, the dashboard, SQLite, and crawlers sit around that core. Applications own their own data model, storage, and user interface.",
    "weight": 1.0
  },
  {
    "input": "How do I build AIRust?",
    "output": "Use Rust 1.89 or newer. cargo build --locked --release builds the default library. cargo run --locked --example core demonstrates it. Enable cli for command-line tools, pdf for PDF extraction, or web for the optional dashboard.",
    "weight": 1.5
  },
  {
    "input": "What features does AIRust have?",
    "output": "The default library includes stable entry IDs, BM25 and TF-IDF ranking, exact and fuzzy text comparison, token overlap, duplicate groups, metadata filters, JSON exchange, and explained lexical relation proposals. PDF, CLI, web, SQLite, and bots are optional.",
    "weight": 2.0
  },
  {
    "input": "How do I export training data?",
    "output": "Use the optional dashboard training export or save a KnowledgeBase as JSON. Training metadata is preserved. Generic Engine entries are exported through Engine::to_json.",
    "weight": 1.0
  },
  {
    "input": "How do I import Tatoeba translation data?",
    "output": "The optional dashboard includes a Tatoeba import adapter. Translation examples are application data; AIRust does not become a general language translator by loading them. Review the import configuration and dataset license before use.",
    "weight": 1.0
  },
  {
    "input": "What is the merge_kb tool?",
    "output": "merge_kb combines input/output training files. Pass source paths and --output TARGET.json, or use its default knowledge directory discovery. The output is excluded from input discovery. Exact duplicate examples are removed, and invalid sources leave the destination intact.",
    "weight": 1.0
  },
  {
    "input": "Is AIRust free?",
    "output": "AIRust is distributed under the MIT License. See LICENSE for the permission terms and warranty disclaimer. No external model subscription is required by the core.",
    "weight": 1.0
  },
  {
    "input": "What version is AIRust?",
    "output": "This source version is AIRust 0.1.9. It includes English documentation and interfaces, safer persistence and process controls, and hardened optional web tools. Version artifacts are listed at https://crates.io/crates/airust/0.1.9. DenkMaps integration and an MCP transport are separate work and are not included.",
    "weight": 1.0
  },
  {
    "input": "help",
    "output": "Try cargo run --locked --example core to explore the shared Engine. In the optional dashboard, ask about search, matching, metadata, or training data. The README and STARTUP.md explain the library and optional tools.",
    "weight": 3.0
  },
  {
    "input": "What can you do?",
    "output": "AIRust searches knowledge, compares text, groups duplicates, and proposes lexical connections. The optional dashboard returns stored responses. Applications choose which results to display or persist.",
    "weight": 2.0
  },
  {
    "input": "How do smart settings work?",
    "output": "The optional dashboard can recognize supported English settings commands, such as changing theme or colors. This is rule-based command handling. It does not provide general natural-language understanding.",
    "weight": 1.0
  },
  {
    "input": "What are the use cases for AIRust?",
    "output": "Use AIRust for searching notes or document passages, local FAQ retrieval, duplicate detection, metadata-scoped knowledge access, and candidate connections between records. The generic Rust API can be embedded in different applications.",
    "weight": 1.0
  },
  {
    "input": "What is pattern matching?",
    "output": "AIRust supports normalized exact comparison, Levenshtein spelling similarity, and Jaccard token overlap. BM25 and TF-IDF separately rank shared search terms. These methods do not infer semantic equivalence automatically.",
    "weight": 1.5
  },
  {
    "input": "What is fuzzy search?",
    "output": "Fuzzy matching tolerates character-level spelling differences using Levenshtein distance. A configurable similarity threshold controls which candidates qualify. A spelling match is not proof that two statements mean the same thing.",
    "weight": 1.5
  },
  {
    "input": "What is semantic similarity?",
    "output": "Semantic similarity compares meaning, including different expressions for the same idea. AIRust has no built-in semantic model. Applications can optionally combine the lexical core with an external embedding provider or language model.",
    "weight": 1.5
  },
  {
    "input": "What is BM25?",
    "output": "BM25 ranks documents using shared query terms, term rarity, frequency saturation, and document-length normalization. Its values are relevance scores rather than probabilities. AIRust uses validated k1 and b settings.",
    "weight": 1.0
  },
  {
    "input": "What is Rust?",
    "output": "Rust is a systems programming language with ownership and borrowing rules for memory safety. AIRust uses standard Rust collections and a synchronous API for its knowledge core.",
    "weight": 1.0
  },
  {
    "input": "What is cosine similarity?",
    "output": "Cosine similarity compares vector direction through the normalized dot product. AIRust uses it for TF-IDF vectors. A high lexical cosine score reflects term overlap, not guaranteed agreement in meaning.",
    "weight": 1.0
  },
  {
    "input": "What is a knowledge base?",
    "output": "The core stores KnowledgeEntry values with application-owned IDs, text, and optional metadata. The compatibility KnowledgeBase stores question/answer training examples. Embedded demonstration data is optional.",
    "weight": 1.5
  },
  {
    "input": "What is SQLite?",
    "output": "SQLite is an embedded relational database used by the optional dashboard. The shared Engine itself is an in-memory index and does not require SQLite.",
    "weight": 1.0
  },
  {
    "input": "What is a WebSocket?",
    "output": "A WebSocket is a persistent two-way network connection. The optional dashboard uses one for console events. The core library does not need a WebSocket connection.",
    "weight": 1.0
  },
  {
    "input": "What is REST API?",
    "output": "A REST-style HTTP API exposes operations through requests and structured responses. AIRust has an optional HTTP adapter, while applications can call the Rust library directly.",
    "weight": 1.0
  },
  {
    "input": "What is web scraping?",
    "output": "Web scraping fetches and extracts website content. AIRust offers optional crawler adapters. Respect the source website, review imported content, and retain provenance when using collected material.",
    "weight": 1.0
  },
  {
    "input": "How do I train the AI?",
    "output": "The compatibility agents index supplied training examples and retrieve stored outputs. Call train to replace examples or append to add them. This is classical retrieval, not neural model training. The generic Engine uses upsert for application-owned knowledge entries.",
    "weight": 2.0
  }
]