Mental model
- Timetable ≠ remaining tickets ≠ delays: These three types of information differ in real-time nature and authoritative source; when outputting, make clear which type you are checking.
- Remaining tickets/delays are strongly real-time: Must include source link and local update time; if you can't get it, don't draw a conclusion.
- Station name/date are key: The same city has multiple stations; "today/tomorrow" must be resolved to the local date.
Ask only 1 key question (only when necessary)
When key information is missing, ask only one:
- Missing date: "Which day (local date) train are you checking?"
- Unclear station name: "Which station are you departing from and which station are you going to? (e.g. Shenzhen North → Guangzhou South)"
- Unclear goal (timetable/remaining tickets/delays): "Do you want to see the timetable、remaining tickets or delays/suspensions?”
Hard output requirements (strong constraints)
Must include:
- Type: timetable / remaining tickets / delays / suspensions
- Departure station → arrival station + date (local date)
- Train number (if provided by the user or given by the source)
- Source + link
- Local time(the update/publish time of the source page; if unavailable, write "source did not specify")
Suggested format (Markdown):
- Shenzhen North → Guangzhou South (YYYY-MM-DD) remaining tickets/timetable/delays(Source:xxx; local time: YYYY-MM-DD HH:mm / source did not specify)
- Result: the most critical one or two items (don't flood the screen)
Source strategy (China-focused)
Whitelist (used for drawing conclusions)
12306.cn(official ticketing/query channel; used for remaining tickets, on-time/suspension information, authoritative timetables)
Remaining ticket query priority chain (prefer 12306 deep links)
When the user asks about remaining tickets/fares/purchasability ,do not treat "go to some link and check yourself" as the answer. You should first look up the result yourself, then give the user the result + source together; among these, 12306 must be prioritized.
Execution method (constrained within the skill, not dependent on custom tools):
- First open the 12306 deep link page (
leftTicket/initorlcQuery/init), and complete the query/read the results on the page (if necessary, use web reading/browser tools to extract the list content). - Organize the key results into just 2~5 items (train number/departure and arrival/duration/remaining tickets) to avoid flooding the screen.
- When outputting, you must include the corresponding 12306 deep link (so the user can verify), and clearly state the Beijing time you queried (if the page does not indicate an update time, write "subject to the query time").
Source links (as citations/verification, not to make the user check on your behalf):
- Direct remaining tickets/train list (leftTicket):
- Template:
https://kyfw.12306.cn/otn/leftTicket/init?linktypeid=dc&fs=<出发站名>,<出发站码>&ts=<到达站名>,<到达站码>&date=<YYYY-MM-DD>&flag=N,N,Y - Example:
https://kyfw.12306.cn/otn/leftTicket/init?linktypeid=dc&fs=江门,JOQ&ts=深圳北,IOQ&date=2026-01-19&flag=N,N,Y
- Template:
- Transfer connection query (lcQuery)(prioritize this when the user explicitly wants "transfer/connection" or when direct results are unsatisfactory):
- Template:
https://kyfw.12306.cn/otn/lcQuery/init?linktypeid=dc&fs=<出发站名>,<出发站码>&ts=<到达站名>,<到达站码>&date=<YYYY-MM-DD>&flag=N,N,Y - Example:
https://kyfw.12306.cn/otn/lcQuery/init?linktypeid=dc&fs=江门,JOQ&ts=深圳北,IOQ&date=2026-01-19&flag=N,N,Y
- Template:
Usage points:
- The station code must be the 12306 station code(e.g.
深圳北=IOQ). If the user only provides the station name, first confirm the station code using the official 12306 station name code table; if the station name is ambiguous (multiple stations in the same city/old station name), ask for clarification first before generating the deep link. - How to write the update time: The 12306 remaining tickets list page usually does not separately indicate the "update time"; in this case, write in the output:
以查询时刻为准(北京时间 YYYY-MM-DD HH:mm), and clearly state "the page does not indicate an update time". - Conclusion constraints: Even if a third-party page shows remaining tickets/fares, it can only serve as auxiliary; the final conclusion must be based on that 12306 deep link page (or an equivalent official query page).
- Exception handling (only in case of force majeure): If 12306 triggers a CAPTCHA/risk control that makes it impossible to read data, you must clearly state "I cannot directly obtain real-time remaining tickets here right now", and provide the 12306 deep link as an alternative verification path (at the same time, do not fabricate any remaining ticket conclusions).
Whole web (only for supporting evidence/cross-verification)
- Third-party sites can be used for auxiliary search/guidance, but conclusions about remaining tickets and service suspensions/delays must go back to official or equivalent authoritative sources.
NEVER (absolutely prohibited)
- Do not fabricate remaining ticket quantities, fares, delay minutes, or service suspension information
- Do not treat historical timetables as the day's operating conditions
- Do not output specific train numbers and times without confirming the date/station