AI Personal Learning
and practical guidance

Intelligent Documentation: Efficient Tender Document Creation with Dify Chatflow

Natural Language Interactive Database Reading and Writing

As we approach the end of the year and the bidding season, the preparation of large documents such as tender documents is often a headache.

Not only to ensure that the content is accurate and professional, but also to highlight the advantages of the enterprise, not only to test the professional knowledge, but also requires copywriting skills. Even if both, still need to spend a lot of time and energy to write word by word, the workload is huge, and the difficulty is quite high.


So, this program, based on the Dify The intelligent document preparation workflow of the framework has become an efficient solution, the core of which is the use of Dify-Chatflow to realize natural language-driven database read and write operations, which can automatically read the original document, modify or write new content according to user needs, and automatically generate a document overview and extract key points, and finally complete the preservation.

This workflow uses dify's Chat Assistant workflow orchestration pattern, also called Chatflow.

 

Chatflow VS Workflow

Chatflow application scenarios:

Oriented towards dialog-type scenarios, including customer service, semantic search, and other conversational applications that require multi-step logic in constructing responses. This type of application is characterized by support for multiple rounds of conversational interactions to adjust the generated results.

Common interaction paths: giving instructions → generating content → multiple discussions about the content → re-generating the result → end

 

Workflow application scenarios:

Oriented towards automation and batch processing scenarios, suitable for applications such as high-quality translation, data analytics, content generation, email automation, and so on. This type of application does not allow for multiple rounds of dialog interaction with the generated results.

Common interaction paths: give command → generate content → end

 

Intelligent Documentation Chatflow Implementation Logic

Step1

We split large documents into multiple text blocks. For example, the common contents of a tender document: company profile, quality assurance measures, technical R&D capabilities, after-sales service guarantee, etc., are divided into separate text blocks.

Step2

Store these blocks of text in a database. The main reason for choosing database storage over local files is that databases are easy to share, and structuring the document content makes it easier to post-process and respond to diverse demand scenarios. Our data table includes fields such as ID, title, category, overview, key points, content, and recording time, where the overview and key points are automatically generated by the big model based on the modified content. The overview provides a high level summary of the content, while the main points are entry-based summaries, which can be easily used for subsequent production of PPTs and so on.

Step3

With Dify's Chatflow building application, users can accomplish two tasks through natural language interaction: one is to modify and improve existing document blocks, and the other is to write brand new content. Once the task is completed, the modified and new content is automatically submitted to the database via natural language for updating and saving.

 

Since the entire Chatflow node is complex and numerous, I'll give a brief overview of the whole.

 

Task 1: Revise and refine existing documentation blocks

  1. Document query branch:
  • The user initiates the query request by entering a text block ID (e.g. well number + number).
  • The query branch retrieves the corresponding document block from the database, extracts and displays the ID, title and content.
  • The results of the query are processed through the code execution node and determine whether a valid document block exists.

 

  1. Documentation modification branch:
  • After the user enters a modification request, the system determines whether to expand or modify the document block based on the content.
  • In the modify branch, the big model will modify the queried document according to the user's requirements, and the modified content is output in code block format for easy copying.
  • The user confirms the modified content, if satisfied can enter the saving process, if not, continue to modify.
  • After the user confirms the saving of the modifications, the system saves the modified text to the database and displays an overview and key points of the modifications.

Task II: Preparation of entirely new content

  1. Reset Task Branching: If the user chooses to reset, the system clears the status of previously queried documents in preparation for writing new content.
  2. Compose a new content branch: the user enters a new text block request and the system will compose to the new task, generating titles and content.
  3. New Content Title Tips branch: provides users with new title suggestions to help them better organize and edit their content.
  4. Confirmation of save branch: the user confirms the new content written and eventually enters the save process.
  5. Submit save branch: new content is saved to the database and summaries and key points are output.

 

Description of key functions and nodes

  1. Classifier node: categorizes user inputs and identifies the need for querying, modifying, saving, etc.
  2. Conditional branching nodes: determine the direction of the workflow based on different situations (e.g., whether the content is empty or not).
  3. Code execution node: performs database queries, text processing, and other operations.
  4. Large model node: responsible for generating or modifying text and providing output according to the user's requirements.
  5. Direct Response node: shows the result or prompts the user for an action.
  6. Variable Assignment Node: manages variables in the session to ensure the logic of the process is smooth.

 

Intelligent Documentation: Efficient Tender Document Creation with Dify Chatflow-1Above is the overall process and key functional nodes of Task 1 and Task 2. Through a clear design, the system can flexibly respond to user needs and ensure smooth document query, modification and creation.

 

May not be reproduced without permission:Chief AI Sharing Circle " Intelligent Documentation: Efficient Tender Document Creation with Dify Chatflow

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish