Skip to content

Latest commit

 

History

History
156 lines (109 loc) · 2.61 KB

getting-started.md

File metadata and controls

156 lines (109 loc) · 2.61 KB

Getting Started with ragctl

Quick guide to get started with ragctl CLI.

Installation

From PyPI (Recommended)

pip install ragctl

From Source

git clone git@github.com:datallmhub/ragctl.git
cd ragctl
pip install -e .

Verify Installation

ragctl --version
# Output: ragctl version 0.1.3

Quick Start

1. Chunk Your First Document

# Create a test file
echo "This is a test document for ragctl. It will be chunked into smaller pieces for RAG applications." > test.txt

# Chunk it
ragctl chunk test.txt --show

Output:

✓ Successfully chunked test.txt
   Strategy:            semantic  
   Chunks created:      1         

2. Save Chunks to File

ragctl chunk test.txt -o chunks.json

3. Process Multiple Files

# Create test files
mkdir documents
echo "Document 1 content..." > documents/doc1.txt
echo "Document 2 content..." > documents/doc2.txt

# Process all files
ragctl batch documents --auto-continue

4. Ingest to Vector Store

First, start Qdrant (requires Docker):

docker run -p 6333:6333 qdrant/qdrant

Then ingest:

ragctl ingest chunks.json --collection my_docs

Basic Workflow

# 1. Chunk → 2. Ingest → 3. Query
ragctl chunk document.pdf -o chunks.json
ragctl ingest chunks.json --collection docs
# Use vector store for RAG (requires API or custom integration)

Common Use Cases

Process PDF Documents

ragctl chunk document.pdf --strategy semantic --show

Batch Process Directory

ragctl batch ./pdfs --pattern "*.pdf" --recursive -o ./output

Custom Chunking Parameters

ragctl chunk large_doc.txt \
  --strategy token \
  --max-tokens 512 \
  --overlap 100 \
  -o chunks.json

Next Steps

Troubleshooting

Command not found

# Make sure ragctl is installed
pip show ragctl

# If not, reinstall
pip install --upgrade ragctl

Import errors

# Reinstall dependencies
pip install --upgrade ragctl

Qdrant connection errors

# Make sure Qdrant is running
docker ps | grep qdrant

# Start Qdrant if needed
docker run -p 6333:6333 qdrant/qdrant

Support


Version: 0.1.0
Last Updated: October 28, 2024