Zenphi Tip: Mastering the 'Generate Text with Gemini' Action!
The Gemini AI action in Zenphi is a powerful tool for generating content, summaries, parsing data and more. To ensure your AI workflows are consistently excellent, here are the essential best practices for setting up the 'Generate Text with Gemini' action:
Key Setup & Configuration
API Key Management
If you have your own Gemini keys, make sure to toggle the 'Use API key' on. This will ensure you're using your own account, giving you direct control over usage and billing.
Don't have your own key? Don't worry! Reach out to support@zenphi.com, and we'll be happy to provide information regarding purchasing AI credits you can use directly within the Zenphi platform.
Define Behavior with the Prompt
The prompt is your opportunity to provide optional instructions, such as style and tone, to guide the AI model's behavior.
Do you want it to respond in a formal manner?
Would you like it to have a specific JSON schema output?
All of these instructions are important to ensure the result aligns perfectly with your expectations.
Clarity and Specificity in Your Prompt
To get the best results, ensure your main prompt is clear and specific. The clearer your instructions, the better the output.
Pro Tip for Structured Output: If you're expecting a JSON output, we highly recommend pasting an example of the JSON structure directly into the prompt. This forces the model to use the same format every time, ensuring seamless integration with downstream systems.
Fine-Tuning for Optimal Results
Handling Cut-Off Results (Max Length)
If you're noticing that your generated text is being cut off, make sure to broaden the 'Maximum length' value. This setting controls the maximum number of tokens to generate in the response (one token is roughly four characters for standard English text). Increasing this value allows the AI to complete its full output.
Controlling Randomization (Top K and Top P)
Lowering the Top K and Top P values will make your result less randomized and more deterministic (predictable). If you're not seeing the consistent results you'd like, play around with lowering these values slowly to reduce the AI's creative freedom.
Working with Multimodal Data
Beyond Text: File Support
Lastly, remember that the Gemini action isn't limited to just text analysis! Our action also supports file types including PDFs, images, audio, and video as inputs, allowing you to build incredibly powerful, multimodal workflows right in Zenphi.
By following these best practices, you'll be able to build robust, reliable, and high-quality automations using the Gemini action in Zenphi!
Want to see more of this tool in action, check out our AI playlist on our YouTube Channel.