Document to Text

FlowHunt's Document to Text component transforms structured data into readable markdown text, offering control over processing, prioritizing data, and managing token usage for efficient and relevant text output.

Categories:
Document to 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.

What is the Document to Text component?

This component transforms the structured data from Retrievers into readable markdown text that the bot can use to craft an answer. It also dictates how the data should be processed, which data is prioritized, and which is left out.

Document to Text component in Flowhunt

This component comes with settings that give you control over the resulting text output. These settings include:

Limiting the output

  • Load from pointer: When grabbing knowledge from a particular article, this setting allows you to control whether you only want the exact part of the article related to the query or the whole article to be loaded.
  • Skip the last Heading: The last heading of an article is often the conclusion, the FAQ section, or even the author bio. These are often unnecessary and may even harm the results.
  • Use Metadata: Allows utilization of metadata in the text output.

Max Tokens

Tokens are the fundamental units AI uses to process, analyze, and retrieve information from documents during crawling. The Max Tokens setting limits the total number of tokens used to perform these tasks. This setting ensures the process doesn’t get too pricey or take too long.

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
Ensure accurate AI responses with FlowHunt's Document Retriever. Connect your data sources for reliable, up-to-date information. Try for free!

Document Retriever

Ensure accurate AI responses with FlowHunt's Document Retriever. Connect your data sources for reliable, up-to-date information. Try for free!

Discover how the "Text to Image Prompt Generator" flow on FlowHunt.io transforms webpage content into detailed prompts for AI image generation. Enhance your digital content strategy with creative imagery that aligns with your original themes and messages. Perfect for blog visualization, cover design, and social media content creation.

Text to Image Prompt Generator from URL

Transform URLs into AI image prompts with FlowHunt. Visualize content, enhance creativity, and boost engagement effortlessly!

Discover FlowHunt's modular AI tools and chatbot features for seamless automation and integration with top customer service platforms.

Features

Discover FlowHunt's modular AI tools and chatbot features for seamless automation and integration with top customer service platforms.

Build AI tools and chatbots effortlessly with FlowHunt's no-code platform. Explore templates and components to automate your ideas. Try a demo today!

AI workflow automation

Build AI tools and chatbots effortlessly with FlowHunt's no-code platform. Explore templates and components to automate your ideas. Try a demo today!

Our website uses cookies. By continuing we assume your permission to deploy cookies as detailed in our privacy and cookies policy.