Labsco
haelyons logo

Local Flow

โ˜… 1

from haelyons

A minimal, local, GPU-accelerated RAG server for document ingestion and querying.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

Local Flow

Minimal, local, RAG with GPU acceleration. It actually works. Ships with more dependencies than the Vatican's import list. Runs on Windows and WSL.

Architecture

MCP Server + FAISS + SentenceTransformers + LangChain + FastMCP

Vector database stored in ./vector_db (or wherever RAG_DATA_DIR points). Don't delete it unless you enjoy re-indexing everything. The default is a directory in Windows. You should edit RAG_DATA_DIR if using it with WSL because the argument doesn't always work.

JSON-RPC over stdin/stdout, but we log everything over stderr because we're not cowards.

Examples of stuff that you can index

Your prompts should indicate one of the following behaviours:

  1. Listing the sources currently available.
  2. Indexing a new source (given some local path)
  3. Removing a source (from metadata, not embeddings)
  4. Querying existing source(s) given some prompt, from which keywords/phrases are generated. You can modulate parameters such as top_k, requesting a greater sample of the top ranked return document chunks.

Source example

"What sources are available in the local Flow tool?"
Azure & Machine Learning

Source IDTypeDescriptionChunks
azure_ml_api_docsPDFAzure Machine Learning API documentation4,713
azureml_examples_local_newGit RepoAzure ML examples repository24,290
grounding_dino_repoGit RepoGroundingDINO repository240
folder_9FolderHuggingFace Hub documentation19,706

Vivado / FPGA Development

Source IDTypeDescriptionChunks
vivado_2019_1_ip_guidePDFUG896 - Vivado IP User Guide154
vivado_2019_1_design_flowsPDFUG892 - Vivado Design Flows Overview170
vivado_2019_1_synthesis_guidePDFUG901 - Vivado Synthesis Guide320
pdf_11PDFUG894 - Vivado TCL Scripting164
pdf_8PDFADEAS IP License Config9

Query example 1

"Give me an example of a synthesis parameter I could edit in Vivado to improve my build speed?" -> Ran query_context:LocalFlow -> Query:

"query": "synthesis parameters settings options improve build speed runtime performance"
"source_ids": [
  "vivado_2019_1_synthesis_guide"
],
"top_k": 10

-> Response (raw, this is used to inform the answer):

{
"results": [
{
"content": "MAX_FANOUT option described in Chapter 2, Synthesis Attributes.\nNote: The -fanout_limit switch does not impact control signals (such as set, reset, clock\nenable): use MAX_FANOUT to replicate these signals if needed.\n-directive: Replaces the -effort_level option. When specified, this option runs\nยฐ\nVivado synthesis with different optimizations. See Table 1-2 for a list of all\nstrategies and settings. Values are:\n- Default: Default settings. See Table 1-2.\n- RuntimeOptimized: Performs fewer timing optimizations and eliminates some\nRTL optimizations to reduce synthesis run time.\n- AreaOptimized_high: Performs general area optimizations including forcing\nternary adder implementation, applying new thresholds for use of carry chain in\ncomparators, and implementing area-optimized multiplexers.\nSynthesis 12\nSend Feedback\nUG901 (v2019.1) June 12, 2019 www.xilinx.com",
"source": "C:\\Users\\helios.lyons\\Documents\\flow_src\\ug901-20191-vivado-synthesis.pdf",
"metadata": {
"source": "C:\\Users\\helios.lyons\\Documents\\flow_src\\ug901-20191-vivado-synthesis.pdf",
"page": 12,
"source_type": "pdf",
"source_id": "vivado_2019_1_synthesis_guide"
}
[...]

-> Prompt completion (using chunks from the response):

Based on the Vivado Synthesis Guide (UG901), here's a great example:
-directive RuntimeOptimized
This is the most impactful single parameter for reducing synthesis time. It performs fewer timing optimizations and eliminates some RTL optimizations to reduce run time.