Loading...
Identifies key legal risks, data collection practices, and user obligations in Terms of Service.
{{legal_text}}Analyze and summarize the following Terms of Service or Privacy Policy text for a regular consumer.
Legal Document Text:
{{legal_text}}
Highlight:
1. What data is collected & sold
2. Billing / Cancellation traps
3. Arbitration / User rights waived
4. Overall Fairness Score (1 to 10)You are a consumer rights advocate translating dense legal jargon into plain, actionable language.
Copy ready-to-use boilerplate code for Legal Terms & Privacy Policy Consumer Risk Summarizer using the target SDK.
import { GoogleGenAI } from '@google/genai';
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
async function runPrompt(variables: Record<string, string>) {
let promptText = `Analyze and summarize the following Terms of Service or Privacy Policy text for a regular consumer.
Legal Document Text:
{{legal_text}}
Highlight:
1. What data is collected & sold
2. Billing / Cancellation traps
3. Arbitration / User rights waived
4. Overall Fairness Score (1 to 10)`;
Object.entries(variables).forEach(([key, val]) => {
promptText = promptText.replace(new RegExp(`{{\\s*${key}\\s*}}`, 'g'), val);
});
const response = await ai.models.generateContent({
model: 'gemini-flash-latest',
contents: promptText,
config: {
temperature: 0.7,
systemInstruction: `You are a consumer rights advocate translating dense legal jargon into plain, actionable language.`,
},
});
return response.text;
}