Summarization Overview
Neuredge's summarization capability helps you extract key insights and main points from long texts efficiently. Our models are optimized for accuracy while maintaining the essential context of the original content.
Features
Core Capabilities
- Flexible Length Control: Customize summary length
- Key Points Extraction: Identify main ideas and crucial information
- Multi-Language Support: Summarize content in multiple languages
- Format Preservation: Maintain important structural elements
Quota Details
- Free Tier: 100K tokens/month
- $29 Plan: 1M tokens/month
- $49 Plan: 1.5M tokens/month
- Enterprise: Custom quotas available
Getting Started
Basic Usage
import { NeuredgeClient } from '@neuredge/sdk';
const client = new NeuredgeClient({
apiKey: 'your-api-key'
});
// Simple summarization
const summary = await client.text.summarize(
'Your long text here...',
{ maxLength: 100 }
);
// With more options
const detailedSummary = await client.text.summarize(
'Your long text here...',
{
maxLength: 200,
format: 'bullets',
preserveKeyPoints: true,
language: 'en'
}
);
Python Example
from neuredge_sdk import NeuredgeClient
client = NeuredgeClient("YOUR_API_KEY")
# Basic summarization
summary = client.text.summarize(
"Your long text here...",
max_length=100
)
# Advanced options
detailed_summary = client.text.summarize(
"Your long text here...",
max_length=200,
format="bullets",
preserve_key_points=True,
language="en"
)
Advanced Features
Bullet Point Summarization
const bulletSummary = await client.text.summarize(
'Your long text here...',
{
format: 'bullets',
maxPoints: 5
}
);
Hierarchical Summarization
const hierarchicalSummary = await client.text.summarize(
'Your long text here...',
{
format: 'hierarchical',
levels: 2,
pointsPerLevel: 3
}
);
Multi-Document Summarization
const documents = [
'First document content...',
'Second document content...',
'Third document content...'
];
const combinedSummary = await client.text.summarizeMultiple(
documents,
{
maxLength: 300,
preserveKeyPoints: true
}
);
Best Practices
Optimizing Results
-
Input Preparation
- Clean and format input text
- Remove unnecessary formatting
- Split very long texts into logical sections
-
Length Control
- Set appropriate maxLength
- Use format options for better structure
- Consider content type when choosing parameters
-
Error Handling
try {
const summary = await client.text.summarize(
'Your text here...',
{ maxLength: 100 }
);
} catch (error) {
if (error.code === 'token_quota_exceeded') {
console.log('Token quota exceeded for this tier');
} else if (error.code === 'invalid_request') {
console.log('Invalid request parameters');
}
}
Use Cases
Content Digestion
// Summarize article with key points
const articleSummary = await client.text.summarize(
articleText,
{
format: 'structured',
sections: ['overview', 'key_points', 'conclusion']
}
);
Meeting Notes
// Summarize meeting transcript
const meetingSummary = await client.text.summarize(
transcriptText,
{
format: 'bullets',
categories: ['decisions', 'action_items', 'key_discussions']
}
);
Research Papers
// Academic paper summarization
const paperSummary = await client.text.summarize(
paperText,
{
format: 'academic',
sections: ['abstract', 'methodology', 'findings', 'conclusion']
}
);
Integration Examples
Workflow Automation
async function processDocument(doc: string) {
// Generate summary
const summary = await client.text.summarize(doc, {
maxLength: 200
});
// Translate if needed
const translation = await client.text.translate(
summary,
{ targetLanguage: 'es' }
);
return {
original: summary,
spanish: translation
};
}
Content Pipeline
async function contentPipeline(articles: string[]) {
const results = [];
for (const article of articles) {
// Generate summary
const summary = await client.text.summarize(
article,
{ maxLength: 150 }
);
// Generate embedding for search
const embedding = await client.embeddings.create({
text: summary,
model: 'embedding-v1'
});
results.push({
summary,
embedding: embedding.vector
});
}
return results;
}