What the documents look like
Export tax rebate filing happens after goods leave the country, and the work is tax voucher matching. The daily material set includes the export tax exemption and rebate filing form, the export customs declaration, purchase invoices, and foreign exchange receipt vouchers. These come from the electronic tax bureau, the export rebate filing system, customs electronic data, and the financial ledger. In store service and internal training, the same batch of export business is referenced repeatedly through follow-up questions: first the customs declaration details, then the matching purchase invoice, then the receipt status. Multi-turn dialogue has to carry the context of one batch forward, and the prompt has to state the document scope and how to handle missing evidence.
Constraints at the multi-turn prompts step
Multi-turn dialogue depends on memory turns to carry earlier text. The memory turn setting controls how many earlier rounds of chat are referenced at most. A larger value makes it easier to cite earlier dialogue, and it also brings in more content, which can increase consumption and affect response speed. Rebate filing materials are organized by batch. For one batch, the business entity, customs declaration number, invoice number, and receipt status are spread across different turns. Too few turns loses the earlier association; too many turns pulls in unrelated batches.
The prompt needs to state the document scope, the answering task, and how to treat missing evidence. A field the material does not state is unknown, and the model must not fill in business facts. Whether a session uses the FastGPT database context depends on whether the request passes a non-empty chatId. When chatId is not passed, context is built entirely from the messages array. When chatId is passed, the system takes the session from the database and uses the last item of the messages array as the user question, and the remaining messages are ignored. The context brought in differs between the two methods, and the check has to distinguish them.
Reply format follows what comes next. Ordinary question and answer keeps the default. When a later flow needs to read fixed-format content, select json_schema and fill in the corresponding format requirement. The same vector model requirement for retrieval libraries applies only to libraries that are jointly associated, and it does not extend to external systems. A relevance score does not perform permission or entity isolation.
Configuration and implementation checks
Hypothetical drill sample: a finance staff member at a foreign trade enterprise starts multi-turn follow-up questions about one batch of export business. The material text supplied for checking reads: "Export customs declaration number A, export date March 2024, corresponding purchase invoice number B, invoice date February 2024. The foreign exchange receipt voucher for this batch has not yet been obtained, and the receipt status is not stated in this material." The draft sentence to be judged reads: "This batch has completed foreign exchange receipt and can be submitted for rebate filing." The draft sentence turns a receipt status that is not stated into a completed fact, which goes beyond the material scope.
| Configuration item | Hypothetical trial starting point | Reason for the choice and comparison method |
|---|---|---|
| Memory turns | Hypothetical starting point of 4 turns | The follow-up covers three kinds of information: customs declaration, invoice, and receipt; compare against 2 turns and 8 turns to see whether context is lost or unrelated batches enter |
| Temperature | Hypothetical low starting point | Rebate filing is a rule-defined scenario, and a low value makes answers more stable; compare against a higher setting on consistency for the same question |
| Reply limit | Hypothetical starting point set for answer completeness | It needs to hold field explanations and missing-item notes; compare against a lower limit to see whether the reply is cut off early |
| Reply format | Hypothetical starting point of default | The current use is human-read question and answer; if a later node reads a fixed structure, switch to json_schema and fill in the format requirement |
| Hide AI output | Hypothetical starting point of off | Store training needs to see the answer content; compare against the on state to see the difference in user-visible output |
| Multimodal recognition | Hypothetical starting point of off | The sample input is text material; when the model supports image recognition, enable it as needed and check the media type |
Three common errors
- Treating a receipt status that is not stated as completed. The sample text only says the receipt voucher has not yet been obtained and the receipt status is not stated in this material, while the draft sentence writes "has completed foreign exchange receipt." That field is missing from the material, so the judgment is unsupported and cannot be used as a completed-receipt conclusion.
- Confusing the two ways context is brought in. When a non-empty chatId is passed, the system takes the session from the database and uses the last item of messages as the user question, ignoring the remaining messages. When chatId is not passed, context is built entirely from messages. Treating the content brought in by the two methods as the same leads to a wrong judgment about whether earlier text took effect.
- Using a relevance score in place of a permission judgment. The score returned by retrieval is a similarity value and does not constitute entity isolation or authorized filtering. Treating a high-scoring result as a record with access rights mistakes a retrieval action for an authorization action.
How to verify the setup
- Check missing-evidence handling against the sample draft sentence. The input is the material text above and the draft sentence. Compare whether the draft sentence contains a receipt conclusion not stated in the material. The appearance of "has completed foreign exchange receipt" does not satisfy the condition, and it should be changed to a note that the field is not stated and remains to be verified.
- Check how context is brought in. Start the same batch of follow-up questions once without chatId and once with a non-empty chatId, then compare the context actually brought in. When chatId is passed, the remaining messages are ignored and only the last item is used as the question; observe whether the content brought in matches the expectation.
- Check the reply format. Under the default format, check that the answer is readable text. If a later node needs to read a fixed structure, switch to json_schema and fill in the format requirement, then compare whether the returned structure matches what was filled in. When a field is missing, keep it missing and do not fill in business facts.