# pub.chive.discovery.getSimilar

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.discovery.getSimilar)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.discovery.getSimilar/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.discovery.getSimilar/examples)

## Definitions

### `pub.chive.discovery.getSimilar`

**Type**: `query`

Get related papers for an eprint based on citation patterns, semantic similarity, and topic overlap. Supports graph-based analysis including co-citation and bibliographic coupling.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | AT-URI of the eprint |
| `limit` | `integer` | No | Maximum number of similar papers |
| `includeTypes` | `array` | No | Types of relationships to include. 'co-citation' and 'bibliographic-coupling' use graph analysis. 'collaborative' uses collaborative filtering. |
| `weightSemantic` | `integer` | No | Weight for semantic similarity signal (0-100) |
| `weightCoCitation` | `integer` | No | Weight for co-citation signal (0-100) |
| `weightAuthorNetwork` | `integer` | No | Weight for author network signal (0-100) |
| `weightCollaborative` | `integer` | No | Weight for collaborative filtering signal (0-100) |
| `weightConceptOverlap` | `integer` | No | Weight for concept overlap signal (0-100) |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `eprint` | `ref` → `#eprintRef` | Yes |  |
| `related` | `array` | Yes |  |

#### Errors

- **NotFound**
- **ServiceUnavailable**

### `pub.chive.discovery.getSimilar#author`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes |  |

### `pub.chive.discovery.getSimilar#eprintRef`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes |  |
| `title` | `string` | Yes |  |

### `pub.chive.discovery.getSimilar#relatedEprint`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes |  |
| `score` | `integer` | Yes | Similarity score (scaled by 1000 for 0.0-1.0 range) |
| `title` | `string` | Yes |  |
| `authors` | `array` | No |  |
| `abstract` | `array` | No | Rich abstract with text, formatting, and entity references |
| `categories` | `array` | No |  |
| `explanation` | `string` | Yes | Human-readable explanation of the relationship |
| `sharedCiters` | `integer` | No | Number of papers that cite both (for co-citation) |
| `publicationDate` | `string` (datetime) | No |  |
| `relationshipType` | `string` | Yes | Type of relationship to the source eprint |
| `sharedReferences` | `integer` | No | Number of shared references (for bibliographic coupling) |

## Raw Schema

```json
{
  "id": "pub.chive.discovery.getSimilar",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "NotFound"
        },
        {
          "name": "ServiceUnavailable"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "eprint",
            "related"
          ],
          "properties": {
            "eprint": {
              "ref": "#eprintRef",
              "type": "ref"
            },
            "related": {
              "type": "array",
              "items": {
                "ref": "#relatedEprint",
                "type": "ref"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "uri"
        ],
        "properties": {
          "uri": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the eprint"
          },
          "limit": {
            "type": "integer",
            "default": 5,
            "maximum": 20,
            "minimum": 1,
            "description": "Maximum number of similar papers"
          },
          "includeTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "knownValues": [
                "semantic",
                "citation",
                "topic",
                "author",
                "co-citation",
                "bibliographic-coupling",
                "collaborative"
              ]
            },
            "description": "Types of relationships to include. 'co-citation' and 'bibliographic-coupling' use graph analysis. 'collaborative' uses collaborative filtering."
          },
          "weightSemantic": {
            "type": "integer",
            "maximum": 100,
            "minimum": 0,
            "description": "Weight for semantic similarity signal (0-100)"
          },
          "weightCoCitation": {
            "type": "integer",
            "maximum": 100,
            "minimum": 0,
            "description": "Weight for co-citation signal (0-100)"
          },
          "weightAuthorNetwork": {
            "type": "integer",
            "maximum": 100,
            "minimum": 0,
            "description": "Weight for author network signal (0-100)"
          },
          "weightCollaborative": {
            "type": "integer",
            "maximum": 100,
            "minimum": 0,
            "description": "Weight for collaborative filtering signal (0-100)"
          },
          "weightConceptOverlap": {
            "type": "integer",
            "maximum": 100,
            "minimum": 0,
            "description": "Weight for concept overlap signal (0-100)"
          }
        }
      },
      "description": "Get related papers for an eprint based on citation patterns, semantic similarity, and topic overlap. Supports graph-based analysis including co-citation and bibliographic coupling."
    },
    "author": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        }
      }
    },
    "eprintRef": {
      "type": "object",
      "required": [
        "uri",
        "title"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "title": {
          "type": "string"
        }
      }
    },
    "relatedEprint": {
      "type": "object",
      "required": [
        "uri",
        "title",
        "score",
        "relationshipType",
        "explanation"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "score": {
          "type": "integer",
          "maximum": 1000,
          "minimum": 0,
          "description": "Similarity score (scaled by 1000 for 0.0-1.0 range)"
        },
        "title": {
          "type": "string"
        },
        "authors": {
          "type": "array",
          "items": {
            "ref": "#author",
            "type": "ref"
          }
        },
        "abstract": {
          "type": "array",
          "items": {
            "refs": [
              "pub.chive.richtext.defs#textItem",
              "pub.chive.richtext.defs#nodeRefItem",
              "pub.chive.richtext.defs#wikidataRefItem",
              "pub.chive.richtext.defs#fieldRefItem",
              "pub.chive.richtext.defs#facetRefItem",
              "pub.chive.richtext.defs#eprintRefItem",
              "pub.chive.richtext.defs#annotationRefItem",
              "pub.chive.richtext.defs#authorRefItem",
              "pub.chive.richtext.defs#mentionItem",
              "pub.chive.richtext.defs#linkItem",
              "pub.chive.richtext.defs#tagItem",
              "pub.chive.richtext.defs#latexItem",
              "pub.chive.richtext.defs#codeBlockItem",
              "pub.chive.richtext.defs#headingItem",
              "pub.chive.richtext.defs#listItem",
              "pub.chive.richtext.defs#blockquoteItem"
            ],
            "type": "union"
          },
          "maxLength": 500,
          "description": "Rich abstract with text, formatting, and entity references"
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "explanation": {
          "type": "string",
          "description": "Human-readable explanation of the relationship"
        },
        "sharedCiters": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of papers that cite both (for co-citation)"
        },
        "publicationDate": {
          "type": "string",
          "format": "datetime"
        },
        "relationshipType": {
          "type": "string",
          "description": "Type of relationship to the source eprint",
          "knownValues": [
            "cites",
            "cited-by",
            "co-cited",
            "semantically-similar",
            "same-author",
            "same-topic",
            "bibliographic-coupling",
            "collaborative-filtering"
          ]
        },
        "sharedReferences": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of shared references (for bibliographic coupling)"
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
