Dokument na text

Transformujte štruktúrované dáta na čitateľný markdown text pomocou komponentu Document to Text od FlowHunt, ktorý ponúka prispôsobiteľné ovládanie pre efektívny a relevantný AI-výstup.

Dokument na text

Opis komponentu

Ako funguje komponent Dokument na text

AI can analyze large quantities of data in seconds, but only some of the data will be relevant or suitable for output. The Document to Text component gives you control over how the data from retrievers is processed and transformed into text.

The Document to Text component is designed to transform input knowledge documents into plain text format. This is particularly useful in AI and data processing workflows where textual data is required for further processing, analysis, or as input to language models.

What the Component Does

This component takes one or more structured documents (such as HTML, Markdown, PDFs, or other supported formats) and extracts the textual content. It allows you to specify precisely which parts of the documents to export, whether to include metadata, and how to handle document sections or headers. The output is a unified message object containing the extracted text, ready for downstream tasks like summarization, classification, or question answering.

Inputs

The component accepts several configurable inputs:

Input NameTypeRequiredDescriptionDefault Value
DocumentsList[Document]YesThe knowledge documents to transform into text.N/A (user provided)
From H1 if existsBooleanYesStart extraction from the first H1 header if present.true
Load from pointerBooleanYesStart extraction from the pointer best matching the input query, or load all if not matched.true
Max TokensIntegerNoMaximum number of tokens in the output text.3000
Skip Last HeaderBooleanYesSkip the last header (often a footer) to optimize output.false
StrategyStringYesText extraction strategy: concatenate documents or include equal size from each.“Include equal size from each documents”
Export ContentMulti-selectNoWhich content types to include (e.g., H1, H2, Paragraph).All types selected
Include MetadataMulti-selectNoMetadata fields to include in the output if available.Product

Content Types available: H1, H2, H3, H4, H5, H6, Paragraph
Metadata options: Author, Product, BreadcrumbList, VideoObject, BlogPosting, FAQPage, WebSite, opengraph

Outputs

The component produces the following output:

  • Message: A message object containing the transformed text and any included metadata.

Key Features & Usefulness

  • Flexible Content Extraction: Precisely control which parts of your documents are extracted (e.g., only main headers and paragraphs, or all content).
  • Metadata Inclusion: Optionally include rich metadata (e.g., author, product, or structured data) in the output, useful for downstream contextualization.
  • Token Limit Management: Constrain the output size to fit downstream model requirements by setting a maximum token count.
  • Custom Extraction Strategy:
    • Concat documents, fill from first up to tokens limit: Prioritizes sequentially filling the output from the first document.
    • Include equal size from each document: Balances content from multiple documents within the token limit.
  • Smart Section Handling: Options to skip document footers or start from the most relevant section for your query, increasing the relevance of the extracted text.

Typical Use Cases

  • Preprocessing knowledge bases for AI models (e.g., before embedding or indexing).
  • Summarizing or condensing large documents by extracting only relevant sections.
  • Feeding structured content into chatbots, search engines, or other natural language processing pipelines.
  • Building hybrid retrieval systems that combine text with metadata for richer context.

Summary Table

CapabilityDescription
Input TypesList of Documents
Output TypeMessage (Text + Metadata)
Content GranularitySelect headers/paragraphs to include
Metadata OptionsSelect multiple metadata fields to export
Output Size ControlSet max tokens
Extraction StrategiesConcatenate or balance across documents
Section SelectionStart from H1, from pointer, or skip last header

Strategy

The bot may crawl many documents to create the text output. The Strategy setting lets you control how it utilizes these documents smartly while staying within the token limit.

Currently, there are two possible strategies:

  • Include equal size from each document: Utilizes all found documents equally.
  • Concat documents, fill from first up to token limit: Links the documents together while prioritizing them by relevance to the query.

How to connect the Document to Text component to your flow

This is a transformer component, meaning it bridges the gap between two outputs. Document to Text takes Documents outputted by the Retriever components:

  • Document Retriever – gets knowledge from connected knowledge sources (pages, documents, etc.).
  • URL Retriever – Allows you to specify a URL from which the bot should get knowledge.
  • GoogleSearch – Gives the bot the ability to search the web for knowledge.

The knowledge is converted into readable Markdown text as it passes through the transformer. This text can then be connected to components requiring text input, such as splitters, widgets, or outputs.

Here is an example flow using the Document to Text component to bridge the gap between the Document Retrievers and the AI Generator:

Example of how to use Document Retriever in Flowhunt

Najčastejšie kladené otázky

Čo je komponent Document to Text?

Komponent získava znalosti z komponentov typu retriever a transformuje ich do čitateľného markdown textu, ktorý je možné následne pripojiť k akémukoľvek komponentu, ktorý prijíma text ako vstup.

Vyskúšajte Document to Text vo FlowHunt

Začnite budovať inteligentnejšie AI riešenia s komponentom Document to Text od FlowHunt. Bez problémov konvertujte dáta na akčný text a vylepšite svoje automatizované pracovné postupy.

Zistiť viac

Widget znalostných zdrojov
Widget znalostných zdrojov

Widget znalostných zdrojov

Zobrazte relevantné dokumenty priamo v odpovediach vášho chatbota pomocou widgetu znalostných zdrojov. Táto komponenta zobrazuje vybrané znalostné dokumenty ako...

2 min čítania
AI Knowledge +4
Exportovať do súboru
Exportovať do súboru

Exportovať do súboru

Komponent Exportovať do súboru vo FlowHunt vám umožňuje ukladať text alebo dáta generované počas vášho workflow do stiahnuteľných súborov rôznych formátov, vrát...

2 min čítania
Automation File Export +3
Export do PDF
Export do PDF

Export do PDF

Transformujte text na pripravené PDF súbory na stiahnutie pomocou komponentu Export do PDF vo FlowHunt. Bezproblémovo konvertujte markdown alebo obyčajný text z...

2 min čítania
PDF Document Generation +4