# How peptosis works

> **Simple on the surface. Deeply engineered underneath.**

This section is written for builders, researchers, technical evaluators, and anyone who wants to understand the architecture of what we are building — not just the surface.

{% stepper %}
{% step %}

### Generate

#### The Entry Point Into the Intelligence System

Generation is the first and most important interface between the user and the Peptosis platform. It is where raw intent becomes a structured research profile.

A user can begin generation in multiple ways:

* Enter a known peptide name (e.g. BPC-157, TB-500, Epithalon).
* Describe a desired function or research category (e.g. `longevity`, `tissue repair`, `cognitive support`).
* Submit a custom amino acid sequence for analysis.
* Ask the AI agent to generate novel candidates based on a target profile.

Under the hood, the generation layer does the following:

```js
// Peptosis Generation Layer — Input Processing

INPUT: user_query = 'longevity peptide with strong research signal'

// Step 1: Parse intent and extract search parameters
intent_parser.run(user_query)
=> { category: 'longevity', filter: 'research_strength > 70' }

// Step 2: Query the Peptosis compound database
compound_db.search(intent_params)
=> [ 'Epithalon', 'GHK-Cu', 'Selank', 'BPC-157', 'Humanin' ]

// Step 3: Structure into candidate profiles
profiles = candidates.map(c => build_profile(c))
=> PeptideProfile[]  // passed to Analyze layer
```

The generation layer is not a search engine. It is an intelligent routing system that understands context, maps intent to compound data, and structures candidates for the analysis layer. The output is a set of research-ready profiles, not a list of links.
{% endstep %}

{% step %}

### Analyze

#### The Intelligence Engine

Analysis is where Peptosis earns its value. Every candidate profile is passed through a multi-factor intelligence engine that evaluates the compound across ten weighted dimensions.

This is not a keyword match or a simple database lookup. The analysis engine combines structured data scoring, natural language processing of research literature, similarity mapping against known compounds, and confidence weighting based on data availability.

```js
// Peptosis Analysis Engine — Multi-Factor Scoring

INPUT: PeptideProfile { name: 'Epithalon', sequence: 'Ala-Glu-Asp-Gly' }

// Run all 10 intelligence factors in parallel
analysis_results = await Promise.all([
  scorer.research_strength(profile),      // 0-100
  scorer.stability_profile(profile),      // 0-100
  scorer.bioactivity_signal(profile),     // 0-100
  scorer.safety_flags(profile),           // 0-100
  scorer.novelty(profile),                // 0-100
  scorer.dev_complexity(profile),         // low | medium | high
  scorer.category_relevance(profile),     // 0-100
  scorer.data_confidence(profile),        // 0-100
  scorer.market_relevance(profile),       // 0-100
  scorer.ai_discovery_potential(profile)  // 0-100
])

// Apply weighted scoring model
weighted_score = apply_weights(analysis_results, WEIGHT_CONFIG)
=> { raw_score: 87.4, confidence: 0.91 }
```

Each factor is independently scored and weighted based on its importance to the overall compound evaluation. The weights are configurable at the system level and will become governable by the community as the platform matures.

#### The 10 Intelligence Factors

| Factor                 | Weight | What It Measures                                                         |
| ---------------------- | ------ | ------------------------------------------------------------------------ |
| Research Strength      | High   | Volume and credibility of existing scientific literature and study data  |
| Stability Profile      | Med    | Structural stability indicators relevant to further research             |
| Bioactivity Signal     | High   | Early indicators of meaningful interaction with biological targets       |
| Safety Review Flags    | High   | Known uncertainty areas, risk signals, or limited safety data            |
| Novelty                | Med    | Uniqueness relative to known compounds in the database                   |
| Development Complexity | Med    | Estimated difficulty to synthesize, validate, and advance                |
| Category Relevance     | Med    | Alignment with high-interest research areas (longevity, metabolic, etc.) |
| Data Confidence        | High   | Quality, availability, and consistency of data being analyzed            |
| Market Relevance       | Low    | Category attention, narrative strength, and ecosystem signals            |
| AI Discovery Potential | Med    | Characteristics interesting for AI-assisted optimization                 |
| {% endstep %}          |        |                                                                          |

{% step %}

### Grade

#### Turning Complexity Into a Signal Anyone Can Act On

The grade is the output of the analysis engine distilled into a single, immediately understandable signal. It is designed for one purpose: allow any person, regardless of scientific background, to instantly understand whether a compound deserves more attention.

```js
// Peptosis Grading Engine — Score to Grade Mapping

INPUT: { raw_score: 87.4, confidence: 0.91 }

// Apply confidence adjustment
adjusted_score = raw_score * confidence_multiplier(confidence)
=> 87.4 * 0.97 = 84.8

// Map to grade scale
GRADE_SCALE = {
  'A+': score >= 90,  // Elite — top 5% of analyzed compounds
  'A' : score >= 80,  // Strong — clear signal, proceed
  'B' : score >= 65,  // Promising — warrants deeper review
  'C' : score >= 45,  // Early signal — limited data
  'D' : score <  45   // Weak — high uncertainty
}

FINAL_GRADE = 'A'  // score: 84.8

OUTPUT: PeptideGrade { grade: 'A', score: 84.8, explanation: [...] }
```

The grade is not the end. It is the beginning. Every grade comes with a full explanation — what factors drove it up, what held it back, what the user should look at next. The grade surfaces the signal. The explanation teaches the user how to think about it.
{% endstep %}

{% step %}

### Compare

#### Side-by-Side Compound Intelligence

Comparison is where Peptosis becomes a research tool rather than a reference tool. Users can load two or more compounds into the comparison engine and get a structured, side-by-side intelligence breakdown across all ten scoring factors.

```js
// Peptosis Comparison Engine

compounds = ['BPC-157', 'TB-500']

// Fetch full profiles for both compounds
profiles = await compound_db.batch_fetch(compounds)

// Run full analysis on both
[analysis_A, analysis_B] = await analysis_engine.batch_run(profiles)

// Generate comparison delta
delta = compare_engine.diff(analysis_A, analysis_B)
=> {
     winner_overall: 'BPC-157',
     'BPC-157_stronger': ['bioactivity_signal', 'research_strength'],
     'TB-500_stronger':  ['stability_profile', 'novelty'],
     recommendation: 'BPC-157 for therapeutic research signal;
                      TB-500 for structural stability applications'
   }
```

The comparison engine does not just show numbers side-by-side. It generates a structured recommendation based on the user's intent context, surfaces which compound is stronger for which research application, and flags where data gaps exist on either side.
{% endstep %}

{% step %}

### Discover

#### The Platform Gets Smarter the More It Is Used

Discovery is not a step — it is what happens when all the other steps compound over time. Every generation, every analysis, every grade, every comparison adds to the Peptosis intelligence layer. The system learns which compounds trend together, which categories are emerging, and where the data gaps are most significant.

```js
// Peptosis Discovery Layer — Trend Intelligence

// Run nightly across all analyzed compounds
discovery_engine.run({
  detect_trending_categories(),  // e.g. 'longevity spiking +34% this week'
  surface_underexplored(),       // high novelty + low recent attention
  flag_data_gaps(),              // compounds with low data_confidence
  generate_research_leads(),     // AI-generated novel candidate suggestions
  update_comparison_baselines()  // recalibrate weights from new data
})

// Results published to:
=> Live Research Feed (Dashboard)
=> Token-Gated Intelligence Reports
=> On-Chain Discovery Log (Base)
```

The discovery layer is what transforms Peptosis from a dashboard into a living intelligence network. It does not just reflect the current state of peptide research. It actively surfaces what the market has not noticed yet.
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://peptosis.gitbook.io/peptosis-docs/documentation/platform/how-peptosis-works.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
