What Are the Differences Between Tongyi Farui LLM and Tongyi Farui Application API?
The Tongyi Farui LLM is a legal industry Large Language Model (LLM) product. It is based on Qwen and has been trained with legal industry data and knowledge. It provides basic features, such as answering legal questions, inferring legal applicability, recommending similar cases, assisting with case analysis, generating legal documents, retrieving legal knowledge, and reviewing contract clauses. To use it, you can call the LLM's API operation. You can use different prompts to perform different functions, which makes it flexible for various scenarios.
The Tongyi Farui Application API encapsulates capabilities such as retrieval-augmented generation (RAG) and Agent. These capabilities are built on the Tongyi Farui LLM. Its legal consultation and contract review features offer better performance than the Tongyi Farui LLM. If you need legal consultation or contract review features, we recommend using the Tongyi Farui Application API. To use it, you can call different operations for different scenarios.
How do I pass contract review rules when calling the RunContractResultGeneration operation?
Contract review uses a two-step call: generate the review rules first, then generate the review result.
- Call the RunContractRuleGeneration operation. Pass the contract file ID (fileId) and the review position (position) to obtain the model-generated review rules (rules) and the rule task ID (ruleTaskId).
- Call the RunContractResultGeneration operation. In addition to the contract file ID and the review position, you must pass the review rules. If no review rules are passed, the review result cannot be generated.
You can pass the review rules in either of the following ways:
- Use the rules generated in the previous step: pass rules (the model-generated rule list, which must contain at least one rule) in metaData, or pass the corresponding ruleTaskId.
- Use custom rules: pass custom review rules (including fields such as ruleTitle, ruleDesc, and riskLevel) in metaData.customRuleConfig.customRules.
Note: Although rules, ruleTaskId, and customRuleConfig are marked as not required in the parameter table, you must provide at least one rule source when generating the review result. Do not omit all of them.
Questions and Discussion
If you have any questions when you call the Tongyi Farui API, you can scan the QR code to join the service DingTalk group.
