Overview
This skill uses the Qinyan Academic OpenAPI to support literature search from four major academic databases: Google Scholar, Wanfang, PubMed, and ArXiv. Based on the language and subject area of the user's query, it intelligently selects the optimal search strategy.
Academic Integrity Statement: All search results come from real academic databases; fabricating or guessing literature information is strictly prohibited. If search results are incomplete, the user should be truthfully informed.
Prerequisites
Before use, please ensure:
- The
QINYAN_API_KEYenvironment variable has been set (go to https://platform.qinyanai.com/ to apply) - Available in the environment:
curlandpython3
export QINYAN_API_KEY="your-api-key-here"
Intelligent Search Strategy
After receiving the user's search request, please select the data source according to the following strategy:
Language Strategy
- Chinese query: Prioritize Wanfang, and Google Scholar may also be searched simultaneously
- English query: Prioritize Google Scholar, and other English databases may also be searched simultaneously
Subject Strategy
- Medicine/Biomedicine/Life Sciences: Prioritize PubMed(does not support Chinese queries; must be translated into English)
- Computer Science/Science and Engineering/Mathematics/Physics: Prioritize ArXiv(does not support Chinese queries; must be translated into English)
- Social Sciences/Humanities/General: Prioritize Google Scholar or Wanfang
Important Reminders
- PubMed and ArXiv do not support Chinese search: If the user uses Chinese keywords and needs to search these two databases, the query terms must first be translated into accurate English academic terminology before initiating the search
- Multiple databases can be searched simultaneously to obtain more comprehensive results
- Explain to the user which databases were actually used for the search
Usage
Call the API through the scripts/search.sh script, specifying the data source and search parameters:
bash scripts/search.sh <source> '<json_payload>'
Where <source> is:google | wanfang | pubmed | arxiv
Parameter Descriptions for Each Database
Google Scholar
bash scripts/search.sh google '{"query": "deep learning", "max_results": 20, "offset": 0, "date_from": "2020", "date_to": "2025", "author": "Hinton", "journal": "Nature", "language": "english"}'
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search keywords, supports Boolean expressions (1-300 characters) |
| max_results | int | No (default 20) | Number of results to return, maximum 20 |
| offset | int | No (default 0) | Pagination offset |
| date_from | string | No | Start year, e.g. "2020" |
| date_to | string | No | End year, e.g. "2025" |
| author | string | No | Filter by author |
| journal | string | No | Filter by journal |
| language | string | No | "english" or "中文", leave blank for no restriction |
Wanfang
bash scripts/search.sh wanfang '{"query": "人工智能 教育", "max_results": 50, "date_from": "2020", "date_to": "2025"}'
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search keywords, supports Chinese and English (1-300 characters) |
| max_results | int | No (default 50) | Number of results to return, 1-100 |
| date_from | string | No | Start year |
| date_to | string | No | End year |
PubMed
bash scripts/search.sh pubmed '{"query": "cancer immunotherapy", "max_results": 50, "offset": 0, "date_from": "2020", "date_to": "2025"}'
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search keywords, supports PubMed query syntax (1-300 characters, English only) |
| max_results | int | No (default 50) | Number of results to return, 1-200 |
| offset | int | No (default 0) | Pagination offset |
| date_from | string | No | Start date, "YYYY" or "YYYYMMDD" |
| date_to | string | No | End date, "YYYY" or "YYYYMMDD" |
ArXiv
bash scripts/search.sh arxiv '{"query": "transformer attention", "max_results": 50, "offset": 0, "date_from": "2020", "date_to": "2025", "author": "Vaswani"}'
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search keywords, supports ArXiv query syntax (1-300 characters, English only) |
| max_results | int | No (default 50) | Number of results to return, 1-100 |
| offset | int | No (default 0) | Pagination offset |
| date_from | string | No | Start date |
| date_to | string | No | End date |
| author | string | No | Filter by author |
Output format
Search results are presented to the user in a structured manner:
- Explain the search strategy: inform the user which databases were selected and why
- Results list: each reference includes:
- Title (bold)
- Author list
- Publication year / journal or source
- Abstract (appropriately truncated)
- DOI link (if available)
- PDF link (if available)
- Data source attribution
- Result statistics: total number of results retrieved
Example workflow
User inputs a Chinese query
用户: 帮我检索关于"深度学习在医学影像中的应用"的文献
- Identified as a Chinese query + medical field
- Translate the query into English: "deep learning medical imaging applications"
- Prioritize searching Wanfang(Chinese literature) and PubMed(English medical literature)
- Integrate the results and return them to the user
User inputs an English query
用户: Search papers about "large language models for code generation"
- Identified as an English query + computer science field
- Prioritize searching Google Scholar and ArXiv
- Integrate the results and return them to the user