بنقرة واحدة
derived-from-description
Generate or modify LlamaFarm configuration from natural language description
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate or modify LlamaFarm configuration from natural language description
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| description | Generate or modify LlamaFarm configuration from natural language description |
| disable-model-invocation | true |
| allowed-tools | ["Bash","Read","Write"] |
| argument-hint | <description of project or changes> |
Generate or modify LlamaFarm configurations from natural language descriptions.
/llamafarm:config <description of project or changes>
/llamafarm:config I want to chat with FDA correspondence PDFs using llama3.1
/llamafarm:config Add a second database for archived documents with hybrid search
/llamafarm:config Change the chunking strategy to semantic with 1000 char chunks
/llamafarm:config I have markdown docs and want keyword extraction
/llamafarm:config Switch from Universal Runtime to Ollama
/llamafarm:config Add entity extraction for organizations and dates
/llamafarm:validate internallyWhen the user runs /llamafarm:config <description>, follow these steps:
Determine if this is:
llamafarm.yamlKeywords that indicate new project:
Keywords that indicate modification:
Reference the skill for:
| User Says | Pattern to Use |
|---|---|
| PDF, documents, regulatory, FDA, legal | PDF Documents pattern |
| markdown, notes, docs, README | Markdown/Text Notes pattern |
| mixed, various, multiple formats | Mixed Formats pattern |
| code, source, technical, logs | Code/Technical pattern |
| large, complex, ordinance | Large Complex PDFs pattern |
For new projects, generate complete config:
version: v1
name: <derived-from-description>
namespace: default
runtime:
models:
- name: default
description: "<description-based>"
provider: <universal|ollama|openai>
model: <appropriate-model>
base_url: <appropriate-url>
default: true
prompt_format: unstructured
prompts:
- name: default
messages:
- role: system
content: |
<context-appropriate-system-prompt>
rag:
default_database: main_db
databases:
- name: main_db
type: ChromaStore
config:
collection_name: documents
distance_function: cosine
persist_directory: ./data/main_db
embedding_strategies:
- name: default_embeddings
type: UniversalEmbedder
config:
model: nomic-ai/nomic-embed-text-v2-moe
dimension: 768
retrieval_strategies:
- name: basic_search
type: BasicSimilarityStrategy
config:
top_k: 10
default: true
default_embedding_strategy: default_embeddings
default_retrieval_strategy: basic_search
data_processing_strategies:
- name: <strategy-name>
description: "<description>"
parsers:
<appropriate-parsers-based-on-file-types>
extractors:
<appropriate-extractors-based-on-use-case>
datasets:
- name: <dataset-name>
database: main_db
data_processing_strategy: <strategy-name>
For modifications, read existing config, make targeted changes, preserve structure.
Always run validation before presenting:
# Save to temp file and validate
lf projects validate --config /tmp/generated-config.yaml
If validation fails, fix the issues and regenerate.
Generated LlamaFarm Configuration
=================================
[YAML config here]
---
Next Steps:
1. Save this as `llamafarm.yaml` in your project directory
2. Run: lf start
3. Create your dataset: lf datasets create -s <strategy> -b main_db <dataset-name>
4. Upload files: lf datasets upload <dataset-name> ./path/to/files/*
5. Process: lf datasets process <dataset-name>
6. Chat: lf chat "Your question here"
runtime:
models:
- name: default
provider: universal
base_url: http://127.0.0.1:11540/v1
model: unsloth/Qwen3-4B-GGUF:Q4_K_M
model_api_parameters:
temperature: 0.2
prompts:
- name: default
messages:
- role: system
content: |
You are an expert assistant. Always cite specific document sections.
If information cannot be found in the context, state that clearly.
rag:
data_processing_strategies:
- name: pdf_processor
parsers:
- type: PDFParser_LlamaIndex
file_include_patterns: ["*.pdf", "*.PDF"]
priority: 100
config:
chunk_size: 1200
chunk_overlap: 150
chunk_strategy: semantic
extract_metadata: true
extract_tables: true
- type: PDFParser_PyPDF2
file_include_patterns: ["*.pdf", "*.PDF"]
priority: 50
config:
chunk_size: 1000
chunk_overlap: 120
chunk_strategy: paragraphs
extractors:
- type: EntityExtractor
config:
entity_types: [ORG, DATE, PERSON, PRODUCT]
use_fallback: true
- type: ContentStatisticsExtractor
config:
include_readability: true
rag:
data_processing_strategies:
- name: markdown_processor
parsers:
- type: MarkdownParser_LlamaIndex
file_include_patterns: ["*.md", "*.markdown", "README*"]
priority: 100
config:
chunk_size: 400
chunk_overlap: 40
chunk_strategy: headings
- type: TextParser_Python
file_include_patterns: ["*.txt"]
priority: 90
config:
chunk_size: 400
chunk_overlap: 40
extractors:
- type: HeadingExtractor
config:
max_level: 6
include_hierarchy: true
- type: LinkExtractor
config:
extract_urls: true
- type: ContentStatisticsExtractor
config:
include_readability: true
rag:
databases:
- name: mixed_db
retrieval_strategies:
- name: hybrid_search
type: HybridUniversalStrategy
config:
strategies:
- type: BasicSimilarityStrategy
config:
top_k: 8
weight: 0.6
combination_method: weighted_average
final_k: 10
default: true
data_processing_strategies:
- name: universal_processor
parsers:
- type: PDFParser_LlamaIndex
file_include_patterns: ["*.pdf"]
priority: 100
- type: MarkdownParser_LlamaIndex
file_include_patterns: ["*.md"]
priority: 100
- type: DocxParser_LlamaIndex
file_include_patterns: ["*.docx"]
priority: 100
- type: CSVParser_Pandas
file_include_patterns: ["*.csv"]
priority: 100
- type: TextParser_Python
file_include_patterns: ["*.txt", "*.py", "*.html"]
priority: 50
rag:
data_processing_strategies:
- name: code_processor
parsers:
- type: TextParser_LlamaIndex
file_include_patterns: ["*.py", "*.js", "*.ts", "*.go", "*.java"]
priority: 100
config:
chunk_size: 600
chunk_strategy: code
preserve_code_structure: true
detect_language: true
extractors:
- type: PatternExtractor
config:
predefined_patterns: [email, url, version]
custom_patterns:
- name: function_def
pattern: "def\\s+\\w+\\s*\\("
description: "Python function definitions"
- name: class_def
pattern: "class\\s+\\w+[\\(\\:]"
description: "Class definitions"
- type: LinkExtractor
config:
extract_urls: true
rag:
data_processing_strategies:
- name: large_pdf_processor
parsers:
- type: PDFParser_LlamaIndex
file_include_patterns: ["*.pdf"]
priority: 100
config:
chunk_size: 1100
chunk_overlap: 160
chunk_strategy: semantic
extract_tables: true
- type: PDFParser_PyPDF2
file_include_patterns: ["*.pdf"]
priority: 50
config:
chunk_size: 900
chunk_overlap: 140
extractors:
- type: HeadingExtractor
config:
max_level: 4
include_hierarchy: true
extract_outline: true
- type: EntityExtractor
config:
entity_types: [ORG, DATE, FAC, GPE, LOC]
use_fallback: true
- type: ContentStatisticsExtractor
config:
include_structure: true
When config changes require CLI operations, provide the commands:
lf init my-project
cd my-project
# Then save the generated llamafarm.yaml here
lf datasets create -s <strategy-name> -b <database-name> <dataset-name>
lf datasets upload <dataset-name> ./path/to/files/*
lf datasets process <dataset-name>
lf services status
lf datasets list
lf rag query --database <db> --top-k 5 "test query"