The invention provides a method and a device for realizing content
slicing of an AI Agent based on AI, RPA and LLM, and relates to the field of AI, RPA, LLM and AI Agent. The method comprises the steps of obtaining to-be-sliced content, wherein the to-be-sliced content comprises a plurality of candidate content slices; wherein the plurality of candidate content slices are obtained by
slicing the content to be sliced according to the content structure; calling an LLM (Large
Language Model) to carry out content splitting
processing on at least one candidate content slice in the plurality of candidate content slices to obtain a target content slice; the vector similarity between the statements in the target content slice is greater than or equal to a similarity threshold; and calling the LLM to construct a slice vector
library according to the target content slices, wherein the slice vector
library is used for retrieval enhancement generation
processing. Therefore, the conditions of content looseness, content splitting and the like of the target content slice can be avoided, the accuracy of retrieving the recalled content slice is improved, and the content quality generated by the RAG is improved.