Context

Ask AI a question

Changed on

Query information using natural language. This enhanced endpoint supports three types of queries: (1) questions about specific entities (people, companies), (2) questions about multiple entities at once, and (3) generic workspace-level questions that don't reference specific entities. The AI will analyze your workspace context to provide relevant answers.

post/v1/context/ask

Request

  • Base URL
    https://app.nex.ai/api/developers
  • Auth
    API key in header Authorization

Request body

querystring required

Natural language query - supports single entity questions (e.g., 'What's the status with techflow.io?'), multi-entity questions (e.g., 'Compare engagement levels of Acme Corp and TechFlow'), or general workspace questions (e.g., 'Which deals are most likely to close this quarter?')

Example request

{
  "query": "What's the status with techflow.io?"
}

Response

Query response with relevant information

answerstring

AI-generated response to the query based on available workspace context

Example response

{
  "answer": "Based on the available context, techflow.io appears to be a technology company. Marcus Rodriguez from techflow.io expressed interest in booking a demo on LinkedIn.",
  "entities_considered": [
    {
      "id": 25339323448557880,
      "name": "TechFlow",
      "type": "COMPANY",
      "reason": "Direct match for techflow.io domain",
      "insights_matched": 3,
      "score": 0.95
    },
    {
      "id": 25339323448557884,
      "name": "Marcus Rodriguez",
      "type": "PERSON",
      "reason": "Associated with TechFlow, recent LinkedIn activity",
      "insights_matched": 2,
      "score": 0.87
    }
  ],
  "signals_used": [
    {
      "insight_id": 38485049540083710,
      "entity_id": 25339323448557884,
      "content": "Marcus Rodriguez commented on LinkedIn: Would love to book a demo",
      "score": 0.92,
      "type": "social_activity"
    },
    {
      "insight_id": 38485049540083710,
      "entity_id": 25339323448557880,
      "content": "TechFlow is a SaaS platform for workflow automation",
      "score": 0.88,
      "type": "company_info"
    }
  ],
  "metadata": {
    "query_type": "entity_specific",
    "total_entities_searched": 156,
    "confidence": 0.89
  }
}

Changes

    • info

      api operation id queryContext was added

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status