Best Practices
Search Best Practices
1. Provide Context
const results = await aidp.search({
query: userQuery,
location: userLocation,
context: {
timeOfDay: new Date().getHours(),
dayOfWeek: new Date().getDay(),
sessionId: userSessionId,
},
});2. Handle Location Gracefully
const location = (await getUserLocation()) || getDefaultLocation();3. Use Personalization
Response Best Practices
1. Use AI-Exclusive Content
2. Provide Practical Information
3. Cite Sources
Analytics Best Practices
1. Track All Mentions
2. Batch When Possible
Performance Best Practices
1. Cache Appropriately
2. Handle Errors Gracefully
3. Monitor Performance
Last updated