> ## Documentation Index
> Fetch the complete documentation index at: https://docs.locusmedical.fr/llms.txt
> Use this file to discover all available pages before exploring further.

# GraphRAG retrieving (MKF 0.1.3, LangGraph 2-paths)

> Query maker → (semantic ‖ concept+graph) → context → frontier answer. No judge, no safety sweep. Traced in LangSmith.



## OpenAPI

````yaml /openapi.json post /v2/retrieve
openapi: 3.1.0
info:
  title: Locus API
  description: Locus knowledge layer — REST + MCP for clinical knowledge.
  version: 0.1.0
servers:
  - url: https://core.locusmedical.fr
    description: Production
  - url: http://localhost:8000
    description: Local
security: []
paths:
  /v2/retrieve:
    post:
      tags:
        - retrieve
      summary: GraphRAG retrieving (MKF 0.1.3, LangGraph 2-paths)
      description: >-
        Query maker → (semantic ‖ concept+graph) → context → frontier answer. No
        judge, no safety sweep. Traced in LangSmith.
      operationId: retrieve_endpoint_v2_retrieve_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetrieveRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - lsk: []
components:
  schemas:
    RetrieveRequest:
      properties:
        query:
          type: string
          title: Query
        patient_ehr:
          anyOf:
            - type: string
            - type: 'null'
          title: Patient Ehr
          description: Dossier patient libre (EHR)
        concept_k:
          type: integer
          maximum: 20
          minimum: 1
          title: Concept K
          default: 5
        chunk_k:
          type: integer
          maximum: 50
          minimum: 1
          title: Chunk K
          default: 10
      type: object
      required:
        - query
      title: RetrieveRequest
    RetrieveResponse:
      properties:
        query:
          type: string
          title: Query
        reformulated:
          type: string
          title: Reformulated
          default: ''
        ehr_summary:
          type: string
          title: Ehr Summary
          default: ''
        answer:
          type: string
          title: Answer
          default: ''
        mkus:
          items:
            $ref: '#/components/schemas/RetrieveMku'
          type: array
          title: Mkus
        chunks:
          items:
            $ref: '#/components/schemas/RetrieveChunk'
          type: array
          title: Chunks
        cross_refs:
          items:
            $ref: '#/components/schemas/RetrieveCrossRef'
          type: array
          title: Cross Refs
        concepts:
          items:
            $ref: '#/components/schemas/RetrieveConcept'
          type: array
          title: Concepts
      type: object
      required:
        - query
      title: RetrieveResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RetrieveMku:
      properties:
        id:
          type: string
          title: Id
        verbatim:
          type: string
          title: Verbatim
        criteria:
          type: string
          title: Criteria
          default: ''
        directive:
          type: string
          title: Directive
          default: ''
        mku_class:
          anyOf:
            - type: string
            - type: 'null'
          title: Mku Class
        population:
          items:
            type: string
          type: array
          title: Population
      type: object
      required:
        - id
        - verbatim
      title: RetrieveMku
    RetrieveChunk:
      properties:
        id:
          type: string
          title: Id
        text:
          type: string
          title: Text
        score:
          type: number
          title: Score
        doc_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Doc Id
        doc_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Doc Title
        section_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Section Title
      type: object
      required:
        - id
        - text
        - score
      title: RetrieveChunk
    RetrieveCrossRef:
      properties:
        id1:
          type: string
          title: Id1
        id2:
          type: string
          title: Id2
        polarity:
          type: string
          title: Polarity
      type: object
      required:
        - id1
        - id2
        - polarity
      title: RetrieveCrossRef
    RetrieveConcept:
      properties:
        id:
          type: string
          title: Id
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
      type: object
      required:
        - id
      title: RetrieveConcept
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    lsk:
      type: http
      description: Locus API key — paste the raw `lsk_…` value (no 'Bearer ' prefix).
      scheme: bearer

````