Logo Valyu Best Practices

Valyu Best Practices

Tổ chức
valyuAI
valyu-best-practices

Bộ công cụ Valyu API hoàn chỉnh dành cho tác nhân AI. Dùng kỹ năng này khi cần tìm kiếm theo thời gian thực trên web, trong các nguồn học thuật, y tế, giao thông và tài chính; trích xuất nội dung từ URL; tạo câu trả lời bằng AI có trích dẫn; hoặc lập báo cáo nghiên cứu chuyên sâu toàn diện.

Tổng quan

Nhà phát hànhvalyuAI
Kho mãskills
Tên kỹ năngvalyu-best-practices
Sao
25
Bản fork
2
Tệp đi kèm
46
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 46 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được valyuAI công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Valyu Best Practices trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/valyuAI/skills/tree/main/valyu-search/valyu-best-practices
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/valyuAI/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/valyu-search/valyu-best-practices .claude/skills/valyu-best-practices
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Valyu Best Practices trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Valyu Best Practices ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Valyu Best Practices với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Valyu Best Practices

This skill provides instructions for using the Valyu API to perform search, content extraction, AI-powered answers, and deep research tasks.

Quick Reference: Choosing the Right API

Use this decision tree to select the appropriate Valyu API:

What do you need?

├─ Find information across multiple sources
│  └─ Use Search API
│
├─ Extract content from specific URLs
│  └─ Use Contents API
│
├─ Get an AI-synthesized answer with citations
│  └─ Use Answer API
│
├─ Generate a comprehensive research report
│  └─ Use DeepResearch API
│
└─ Discover available data sources
   └─ Use Datasources API

⚠️ MANDATORY: Use Official Valyu SDK Libraries

CRITICAL: When writing code that uses the Valyu API, you MUST use the official SDK libraries. NEVER make raw HTTP/fetch calls to the Valyu API endpoints.

JavaScript/TypeScript: valyu-js

bash
npm install valyu-js
# or
pnpm add valyu-js
typescript
import { Valyu } from 'valyu-js';

const valyu = new Valyu(process.env.VALYU_API_KEY);

// Now use valyu.search(), valyu.contents(), valyu.answer(), valyu.deepResearch

Python: valyu

bash
pip install valyu
# or
uv add valyu
python
from valyu import Valyu

valyu = Valyu(api_key=os.environ.get("VALYU_API_KEY"))

# Now use valyu.search(), valyu.contents(), valyu.answer(), valyu.deep_research

Why SDK Over Raw API Calls?

  1. Type safety - Full TypeScript/Python type hints for all parameters and responses
  2. Automatic retries - Built-in retry logic for transient failures
  3. Streaming support - Proper async iterator support for streaming responses
  4. Error handling - Structured error types with helpful messages
  5. Future compatibility - SDK updates handle API changes automatically

❌ NEVER Do This

typescript
// DON'T make raw fetch calls
const response = await fetch('https://api.valyu.ai/v1/search', {
  method: 'POST',
  headers: {
    'x-api-key': apiKey,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ query: '...' })
});

✅ Always Do This

typescript
// DO use the SDK
import { Valyu } from 'valyu-js';

const valyu = new Valyu(process.env.VALYU_API_KEY);
const response = await valyu.search({ query: '...' });

1. Search API

Purpose: Find information across web, academic, medical, transportation, financial, news, and proprietary sources.

When to Use

  • Finding recent information on any topic
  • Academic research (arXiv, PubMed, bioRxiv, medRxiv)
  • Financial data (SEC filings, earnings reports, stock data)
  • News monitoring and current events
  • Healthcare data (clinical trials, drug labels)
  • Prediction markets (Polymarket, Kalshi)
  • Transportation (UK National Rail, Global Shipping)

Basic Usage

typescript
const response = await valyu.search({
  query: "transformer architecture attention mechanism 2024",
  searchType: "all",
  maxNumResults: 10
});

Search Types

TypeUse For
allEverything - web, academic, financial, proprietary
webGeneral internet content only
proprietaryLicensed academic papers and research
newsNews articles and current events

Key Parameters

Parameter (TS/JS)Parameter (Python)PurposeExample
queryquerySearch query (under 400 chars)"CRISPR gene editing 2024"
searchTypesearch_typeSource scope"all", "web", "proprietary", "news"
maxNumResultsmax_num_resultsNumber of results (1-20)10
includedSourcesincluded_sourcesLimit to specific sources["valyu/valyu-arxiv", "valyu/valyu-pubmed"]
startDate / endDatestart_date / end_dateDate filtering"2024-01-01"
relevanceThresholdrelevance_thresholdMinimum relevance (0-1)0.7

Domain-Specific Search Patterns

Academic Research:

typescript
await valyu.search({
  query: "CRISPR therapeutic applications clinical trials",
  searchType: "proprietary",
  includedSources: ["valyu/valyu-arxiv", "valyu/valyu-pubmed", "valyu/valyu-biorxiv"],
  startDate: "2024-01-01"
});

Financial Analysis:

typescript
await valyu.search({
  query: "Apple revenue Q4 2024 earnings",
  searchType: "all",
  includedSources: ["valyu/valyu-sec-filings", "valyu/valyu-earnings-US"]
});

News Monitoring:

typescript
await valyu.search({
  query: "AI regulation EU",
  searchType: "news",
  startDate: "2024-06-01",
  countryCode: "EU"
});

Search Recipes

For detailed patterns, see:


2. Contents API

Purpose: Extract clean, structured content from web pages optimized for LLM processing.

When to Use

  • Converting web pages to clean markdown
  • Extracting article text for summarization
  • Parsing documentation for RAG systems
  • Structured data extraction from product pages
  • Processing academic papers

Basic Usage

typescript
const response = await valyu.contents({
  urls: ["https://example.com/article"]
});

With Summarization

typescript
const response = await valyu.contents({
  urls: ["https://arxiv.org/abs/2401.12345"],
  summary: "Extract key findings in 3 bullet points"
});

Structured Extraction (JSON Schema)

typescript
const response = await valyu.contents({
  urls: ["https://example.com/product"],
  summary: {
    type: "object",
    properties: {
      product_name: { type: "string" },
      price: { type: "number" },
      features: { type: "array", items: { type: "string" } }
    },
    required: ["product_name", "price"]
  }
});

Key Parameters

Parameter (TS/JS)Parameter (Python)PurposeExample
urlsurlsURLs to process (1-10)["https://example.com"]
responseLengthresponse_lengthContent length"short", "medium", "large", "max"
extractEffortextract_effortExtraction quality"normal", "high", "auto"
summarysummaryAI summarizationtrue, "instructions", or JSON schema
screenshotscreenshotCapture screenshotstrue

Content Recipes

For detailed patterns, see:


3. Answer API

Purpose: Get AI-powered answers grounded in real-time search results with citations.

When to Use

  • Questions requiring current information synthesis
  • Multi-source fact verification
  • Technical documentation questions
  • Research requiring cited sources
  • Structured data extraction from search results

Basic Usage

typescript
const response = await valyu.answer({
  query: "What are the latest developments in quantum computing?"
});

With Fast Mode (Lower Latency)

typescript
const response = await valyu.answer({
  query: "Current Bitcoin price and 24h change",
  fastMode: true
});

With Custom Instructions

typescript
const response = await valyu.answer({
  query: "Compare React and Vue for enterprise applications",
  systemInstructions: "Provide a balanced comparison with pros and cons. Format as a comparison table."
});

With Streaming

typescript
const stream = await valyu.answer({
  query: "Explain transformer architecture",
  streaming: true
});

for await (const chunk of stream) {
  // Handle: search_results, content, metadata, done, error
  console.log(chunk);
}

Structured Output

typescript
const response = await valyu.answer({
  query: "Apple Q4 2024 financial highlights",
  structuredOutput: {
    type: "object",
    properties: {
      revenue: { type: "string" },
      growthRate: { type: "string" },
      keyHighlights: { type: "array", items: { type: "string" } }
    }
  }
});

Key Parameters

Parameter (TS/JS)Parameter (Python)PurposeExample
queryqueryQuestion to answer"What is quantum computing?"
fastModefast_modeLower latencytrue
systemInstructionssystem_instructionsAI directives"Be concise"
structuredOutputstructured_outputJSON schema{type: "object", ...}
streamingstreamingEnable SSE streamingtrue
dataMaxPricedata_max_priceDollar limit1.0

Answer Recipes

For detailed patterns, see:


4. DeepResearch API

Purpose: Generate comprehensive research reports with detailed analysis and citations.

When to Use

  • Comprehensive market analysis
  • Literature reviews
  • Competitive intelligence
  • Technical deep dives
  • Topics requiring multi-source synthesis

Research Modes

ModeDurationBest For
fast~5 minutesQuick lookups, simple questions
standard~10-20 minutesBalanced research (most common)
heavy~90 minutesComprehensive analysis, complex topics

Create Research Task

typescript
const task = await valyu.deepResearch.create({
  query: "AI chip market competitive landscape 2024",
  model: "standard"
});
// Returns: { deepresearch_id: "abc123", status: "queued" }

Poll for Completion

typescript
const status = await valyu.deepResearch.getStatus(task.deepresearch_id);
// status: "queued" | "running" | "completed" | "failed" | "cancelled"

if (status.status === "completed") {
  console.log(status.output);  // Markdown report
  console.log(status.sources); // Cited sources
  console.log(status.pdf_url); // PDF download link
}

Key Parameters

Parameter (TS/JS)Parameter (Python)PurposeExample
queryqueryResearch question"AI market trends 2024"
modelmodelResearch depth"fast", "standard", "heavy"
outputFormatoutput_formatReport format"markdown", "pdf"
includedSourcesincluded_sourcesSource filtering["valyu/valyu-arxiv", "techcrunch.com"]
startDate / endDatestart_date / end_dateDate range"2024-01-01"

DeepResearch Recipes

For detailed patterns, see:


5. Query Writing Best Practices

Core Principles

  1. Be specific - Use domain terminology
  2. Be concise - Keep queries under 400 characters
  3. Be focused - One topic per query
  4. Add constraints - Include timeframes, source types

Query Anatomy

ElementDescriptionExample
IntentWhat you need"latest advancements" vs "overview"
DomainTopic terminology"transformer architecture"
ConstraintsFilters"2024", "peer-reviewed"
Source typeWhere to lookacademic papers, SEC filings

Good vs Bad Queries

BAD:  "I want to know about AI"
GOOD: "transformer attention mechanism survey 2024"

BAD:  "Apple financial information"
GOOD: "Apple revenue growth Q4 2024 earnings SEC filing"

BAD:  "gene editing research"
GOOD: "CRISPR off-target effects therapeutic applications 2024"

Split Complex Requests

# Don't do this
"Tesla stock performance, new products, and Elon Musk statements"

# Do this instead
Query 1: "Tesla stock performance Q4 2024"
Query 2: "Tesla Cybertruck production updates 2024"
Query 3: "Tesla FSD autonomous driving progress"

Source Filtering

Use includedSources for domain authority:

Financial Research Collection. Some sources to include:

  • valyu/valyu-sec-filings - SEC regulatory filings
  • valyu/valyu-stocks - Stock market data
  • valyu/valyu-earnings-US - Earnings reports
  • reuters.com - Financial news
  • bloomberg.com - Market analysis

Medical Research Collection. Some sources to include:

  • valyu/valyu-pubmed - Medical literature
  • valyu/valyu-clinical-trials - Clinical trial data
  • valyu/valyu-drug-labels - FDA drug information
  • nejm.org - New England Journal of Medicine
  • thelancet.com - The Lancet

Tech Documentation Collection. Some sources to include:

  • docs.aws.amazon.com - AWS documentation
  • cloud.google.com/docs - Google Cloud docs
  • learn.microsoft.com - Microsoft docs
  • kubernetes.io/docs - Kubernetes docs
  • developer.mozilla.org - MDN Web Docs
javascript
// Academic
includedSources: ["valyu/valyu-arxiv", "valyu/valyu-pubmed", "nature"]

// Financial
includedSources: ["valyu/valyu-sec-filings", "bloomberg.com", "reuters.com"]

// Tech news
includedSources: ["techcrunch.com", "theverge.com", "arstechnica.com"]

For complete prompting guide, see references/prompting.md.


6. Common Workflows

Research Workflow

typescript
// 1. Quick search to find sources
const searchResults = await valyu.search({
  query: "CRISPR therapeutic applications",
  searchType: "proprietary",
  maxNumResults: 20
});

// 2. Extract key content from top results
const contents = await valyu.contents({
  urls: searchResults.results.slice(0, 3).map(r => r.url),
  summary: "Extract key findings"
});

// 3. Deep analysis for comprehensive report
const research = await valyu.deepResearch.create({
  query: "CRISPR therapeutic applications comprehensive review",
  model: "heavy"
});

Financial Analysis Workflow

typescript
// 1. Get SEC filings
const filings = await valyu.search({
  query: "Apple 10-K 2024",
  includedSources: ["valyu/valyu-sec-filings"]
});

// 2. Quick synthesis
const summary = await valyu.answer({
  query: "Apple Q4 2024 financial highlights",
  fastMode: true
});

// 3. Structured extraction
const metrics = await valyu.answer({
  query: "Apple financial metrics 2024",
  structuredOutput: {
    type: "object",
    properties: {
      revenue: { type: "string" },
      netIncome: { type: "string" },
      growthRate: { type: "string" }
    }
  }
});

7. Available Data Sources

Valyu provides access to 25+ specialized datasets:

CategoryExamples
AcademicarXiv (2.5M+ papers), PubMed (37M+), bioRxiv, medRxiv
FinancialSEC filings, earnings transcripts, stock data, crypto
HealthcareClinical trials, DailyMed, PubChem, drug labels, ChEMBL, DrugBank, Open Target, WHO ICD
EconomicFRED, BLS, World Bank, US Treasury, Destatis
PredictionsPolymarket, Kalshi
PatentsUS patent database
TransportationUK Rail, Ship Tracking

For complete datasource reference, see references/datasources.md.


8. API Reference

For complete API documentation including all parameters, response structures, and error codes, see references/api-guide.md.


9. Integration Guides

Platform-specific integration documentation:


Additional Resources

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Valyu Best Practices làm được gì?

Bộ công cụ Valyu API hoàn chỉnh dành cho tác nhân AI. Dùng kỹ năng này khi cần tìm kiếm theo thời gian thực trên web, trong các nguồn học thuật, y tế, giao thông và tài chính; trích xuất nội dung từ URL; tạo câu trả lời bằng AI có trích dẫn; hoặc lập báo cáo nghiên cứu chuyên sâu toàn diện.

Vì sao nên dùng Valyu Best Practices trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Valyu Best Practices là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Valyu Best Practices trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/valyuAI/skills/tree/main/valyu-search/valyu-best-practices. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Valyu Best Practices?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Valyu Best Practices với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Valyu Best Practices với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Valyu Best Practices có miễn phí không?

Có. Kỹ năng này được valyuAI phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇