diff --git a/dimod/sampleset.py b/dimod/sampleset.py
index f93633af..87179821 100644
--- a/dimod/sampleset.py
+++ b/dimod/sampleset.py
@@ -912,7 +912,51 @@ class SampleSet(abc.Iterable, abc.Sized):
         # dev note: we don't check the energies as they should be the same
         # for individual samples
 
-        return self.__class__(record, self.variables, self.info, self.vartype)
+        return type(self)(record, self.variables, self.info, self.vartype)
+
+    def truncate(self, n, sorted_by='energy'):
+        """Create a new SampleSet with rows truncated after n.
+
+        Args:
+            n (int):
+                Maximum number of rows in the returned sample set.
+
+            sorted_by (str/None, optional, default='energy'):
+                Selects the record field used to sort the samples before
+                truncating. Note that sample order is maintained in the
+                underlying array.
+
+        Returns:
+            :obj:`.SampleSet`
+
+        Examples:
+            >>> sampleset = dimod.SampleSet.from_samples(np.ones((5, 5)), dimod.SPIN, energy=5)
+            >>> print(sampleset)
+                0   1   2   3   4  energy  num_occ.
+            0  +1  +1  +1  +1  +1       5         1
+            1  +1  +1  +1  +1  +1       5         1
+            2  +1  +1  +1  +1  +1       5         1
+            3  +1  +1  +1  +1  +1       5         1
+            4  +1  +1  +1  +1  +1       5         1
+
+            [ 5 rows, 5 variables ]
+            >>> print(sampleset.truncate(2))
+                0   1   2   3   4  energy  num_occ.
+            0  +1  +1  +1  +1  +1       5         1
+            1  +1  +1  +1  +1  +1       5         1
+
+            [ 2 rows, 5 variables ]
+
+        """
+        record = self.record
+
+        if sorted_by is None:
+            record = record[:n]
+        else:
+            sort_indices = np.argsort(record[sorted_by])
+            record = record[sort_indices[:n]]
+
+        return type(self)(record, self.variables, self.info, self.vartype)
 
     ###############################################################################################
     # Serialization
diff --git a/docs/reference/sampleset.rst b/docs/reference/sampleset.rst
index d9705d80..96267201 100644
--- a/docs/reference/sampleset.rst
+++ b/docs/reference/sampleset.rst
@@ -14,6 +14,14 @@ sample_like Objects
 
    as_samples
 
+Utility Functions
+=================
+
+.. autosummary::
+   :toctree: generated/
+
+   concatenate
+
 SampleSet
 =========
 
@@ -28,72 +36,30 @@ Properties
 .. autosummary::
    :toctree: generated/
 
+   SampleSet.first
+   SampleSet.info
    SampleSet.record
    SampleSet.variables
-   SampleSet.info
    SampleSet.vartype
-   SampleSet.first
 
 
 Methods
 -------
 
-Viewing a Response
-~~~~~~~~~~~~~~~~~~
-
 .. autosummary::
    :toctree: generated/
 
-   SampleSet.samples
+   SampleSet.aggregate
+   SampleSet.change_vartype
+   SampleSet.copy
    SampleSet.data
-
-Constructing a Response
-~~~~~~~~~~~~~~~~~~~~~~~
-
-.. autosummary::
-   :toctree: generated/
-
+   SampleSet.done
+   SampleSet.from_future
    SampleSet.from_samples
    SampleSet.from_samples_bqm
-   SampleSet.from_future
-
-Transformations
-~~~~~~~~~~~~~~~
-
-.. autosummary::
-   :toctree: generated/
-
-   SampleSet.change_vartype
+   SampleSet.from_serializable
    SampleSet.relabel_variables
-
-Copy
-~~~~
-
-.. autosummary::
-   :toctree: generated/
-
-   SampleSet.copy
-
-Aggregate
-~~~~~~~~~
-
-.. autosummary::
-   :toctree: generated/
-
-   SampleSet.aggregate
-
-Done
-~~~~
-
-.. autosummary::
-   :toctree: generated/
-
-   SampleSet.done
-
-Utility Functions
-=================
-
-.. autosummary::
-   :toctree: generated/
-
-   concatenate
+   SampleSet.samples
+   SampleSet.to_pandas_dataframe
+   SampleSet.to_serializable
+   SampleSet.truncate

SampleSet.trim or similar
Something like
```
samples.trim(n, 'energy')
```
which would return a new sampleset containing the first n rows of the sampleset ordered by energy.

We could then do things like
```
samples.aggregate().trim(n)
```
diff --git a/tests/test_sampleset.py b/tests/test_sampleset.py
index 9eb9a300..a36a6b2c 100644
--- a/tests/test_sampleset.py
+++ b/tests/test_sampleset.py
@@ -241,6 +241,34 @@ class TestSampleSet(unittest.TestCase):
         self.assertEqual(samples,
                          dimod.SampleSet.from_samples(([-1, 1], 'ab'), dimod.SPIN, energy=1))
 
+    def test_truncate(self):
+        bqm = dimod.BinaryQuadraticModel.from_ising({v: -1 for v in range(100)}, {})
+        samples = dimod.SampleSet.from_samples_bqm(np.tril(np.ones(100)), bqm.binary)
+
+        # by default should be in reverse order
+        new = samples.truncate(10)
+        self.assertEqual(len(new), 10)
+        for n, sample in enumerate(new.samples()):
+            for v, val in sample.items():
+                if v > 100 - n - 1:
+                    self.assertEqual(val, 0)
+                else:
+                    self.assertEqual(val, 1)
+
+    def test_truncate_unordered(self):
+        bqm = dimod.BinaryQuadraticModel.from_ising({v: -1 for v in range(100)}, {})
+        samples = dimod.SampleSet.from_samples_bqm(np.triu(np.ones(100)), bqm.binary)
+
+        # now undordered
+        new = samples.truncate(10, sorted_by=None)
+        self.assertEqual(len(new), 10)
+        for n, sample in enumerate(new.samples()):
+            for v, val in sample.items():
+                if v < n:
+                    self.assertEqual(val, 0)
+                else:
+                    self.assertEqual(val, 1)
+
 
 class TestSampleSetIteration(unittest.TestCase):
     def test_data_reverse(self):

pip install -e .[all]
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y libboost-dev
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
charset-normalizer==2.0.12
codecov==2.1.13
coverage==6.2
Cython==3.0.12
decorator==5.1.1
-e git+https://github.com/dwavesystems/dimod.git@8e7a2b51c6add6c7885b2e62e280b0ab20bdc53d#egg=dimod
idna==3.10
importlib-metadata==4.8.3
iniconfig==1.1.1
jsonschema==2.6.0
mock==2.0.0
networkx==2.0
numpy==1.15.0
packaging==21.3
pandas==0.22.0
pbr==6.1.1
pluggy==1.0.0
py==1.11.0
pymongo==3.7.1
pyparsing==3.1.4
pytest==7.0.1
python-dateutil==2.9.0.post0
pytz==2025.2
requests==2.27.1
six==1.11.0
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
zipp==3.6.0

name: dimod
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - charset-normalizer==2.0.12
      - codecov==2.1.13
      - coverage==6.2
      - cython==3.0.12
      - decorator==5.1.1
      - idna==3.10
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - jsonschema==2.6.0
      - mock==2.0.0
      - networkx==2.0
      - numpy==1.15.0
      - packaging==21.3
      - pandas==0.22.0
      - pbr==6.1.1
      - pluggy==1.0.0
      - py==1.11.0
      - pymongo==3.7.1
      - pyparsing==3.1.4
      - pytest==7.0.1
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - requests==2.27.1
      - six==1.11.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/dimod

tests/test_sampleset.py::TestSampleSet::test_truncate tests/test_sampleset.py::TestSampleSet::test_truncate_unordered
tests/test_sampleset.py::Test_as_samples::test_copy_false tests/test_sampleset.py::Test_as_samples::test_dict_with_inconsistent_labels tests/test_sampleset.py::Test_as_samples::test_dict_with_labels tests/test_sampleset.py::Test_as_samples::test_empty_dict tests/test_sampleset.py::Test_as_samples::test_empty_list tests/test_sampleset.py::Test_as_samples::test_empty_list_labelled tests/test_sampleset.py::Test_as_samples::test_empty_ndarray tests/test_sampleset.py::Test_as_samples::test_iterator tests/test_sampleset.py::Test_as_samples::test_iterator_labelled tests/test_sampleset.py::Test_as_samples::test_list_of_empty tests/test_sampleset.py::Test_as_samples::test_mixed_sampletype tests/test_sampleset.py::Test_as_samples::test_ndarray tests/test_sampleset.py::Test_as_samples::test_ndarray_labelled tests/test_sampleset.py::TestSampleSet::test_aggregate_simple tests/test_sampleset.py::TestSampleSet::test_eq_ordered tests/test_sampleset.py::TestSampleSet::test_from_bqm_single_sample tests/test_sampleset.py::TestSampleSet::test_from_samples tests/test_sampleset.py::TestSampleSet::test_from_samples_empty tests/test_sampleset.py::TestSampleSet::test_from_samples_fields_multiple tests/test_sampleset.py::TestSampleSet::test_from_samples_fields_single tests/test_sampleset.py::TestSampleSet::test_from_samples_iterator tests/test_sampleset.py::TestSampleSet::test_from_samples_single_sample tests/test_sampleset.py::TestSampleSet::test_from_samples_str_labels tests/test_sampleset.py::TestSampleSet::test_from_samples_with_aggregation tests/test_sampleset.py::TestSampleSet::test_mismatched_shapes tests/test_sampleset.py::TestSampleSet::test_shorter_samples tests/test_sampleset.py::TestSampleSetIteration::test_data_reverse tests/test_sampleset.py::TestSampleSetSerialization::test_functional_json tests/test_sampleset.py::TestSampleSetSerialization::test_functional_simple_shapes tests/test_sampleset.py::TestSampleSetSerialization::test_functional_str tests/test_sampleset.py::TestSampleSet_to_pandas_dataframe::test_sample_column tests/test_sampleset.py::TestSampleSet_to_pandas_dataframe::test_simple tests/test_sampleset.py::TestSampleSet_first::test_empty tests/test_sampleset.py::Test_concatenate::test_empty tests/test_sampleset.py::Test_concatenate::test_simple tests/test_sampleset.py::Test_concatenate::test_variables_order tests/test_sampleset.py::Test_concatenate::test_variables_order_and_vartype
docs/reference/sampleset.rst dimod/sampleset.py
docs/reference/sampleset.rst dimod/sampleset.py